File nautilus-open-any-terminal.spec of Package nautilus-open-any-terminal

#
# spec file for package python-nautilus_open_any_terminal
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/


%define pythons python3

Name:           nautilus-open-any-terminal
Version:        0.7.0
Release:        0
License:        GPL-3.0
Summary:        New variable terminal entry in contextmenu
Url:            https://github.com/Stunkymonkey/nautilus-open-any-terminal
Group:          Development/Languages/Python
Source0:        https://github.com/Stunkymonkey/nautilus-open-any-terminal/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Provides:       python3-nautilus_open_any_terminal = %{version}
Obsoletes:      python3-nautilus_open_any_terminal <= 0.2.10
Requires:		python3-nautilus
BuildRequires:	glib2-devel
%if 0%{?suse_version}
BuildRequires:	python-nautilus-common-files
%endif
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildArch:      noarch

%define pyname %(sed 's/-/_/g' <<< %{name})

%description
Adds an context-entry to Nautilus for opening other terminal-emulators then gnome-terminal.

%lang_package

%prep
%autosetup -p1

%build
%python_build

%install
%python_install
rm %{buildroot}%{_datadir}/caja-python/extensions/nautilus_open_any_terminal.py
rmdir %{buildroot}%{_datadir}/caja-python/extensions/
rmdir %{buildroot}%{_datadir}/caja-python/

%python_expand %fdupes %{buildroot}%{$python_sitelib}

%find_lang %{name}
sed -i '/site-packages/d' %{name}.lang
%files lang -f %{name}.lang

%files
%{python_sitelib}/%{pyname}*
%{_datadir}/glib-2.0/schemas/com.github.stunkymonkey.%{name}.gschema.xml
%{_datadir}/nautilus-python/extensions/nautilus_open_any_terminal.py

%changelog
openSUSE Build Service is sponsored by