File nautilus-terminal.spec of Package nautilus-terminal

#
# spec file for package nautilus-terminal
#
# Copyright (c) 2014 SUSE LINUX Products 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 have_lang 0

Name:           nautilus-terminal
Version:        1.0
Release:        0
Summary:        Integrated Terminal for the Nautilus File Browser
License:        GPL-3.0+
Group:          System/GUI/GNOME
Url:            http://software.flogisoft.com/nautilus-terminal/
Source:         %{name}_%{version}_src.tar.gz
# PATCH-FIX-UPSTREAM nautilus-terminal-vte2.91.patch dimstar@opensuse.org -- Fix usage with Vte 2.91.
Patch0:         nautilus-terminal-vte2.91.patch
# For directory ownership:
BuildRequires:  gobject-introspection
BuildRequires:  python-nautilus
BuildRequires:  vte-devel
Requires:       nautilus
%if %{have_lang}
Recommends:     %{name}-lang
%endif
Recommends:     python-xdg
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Nautilus Terminal is an integrated terminal for the Nautilus file browser.

%if %{have_lang}
%lang_package
%endif

%prep
%setup -q -n %{name}_%{version}_src
if pkg-config --exists vte-2.91; then
# patch0 only applies when built against Vte 2.91
%patch0 -p1
fi
sed -i '
s:/usr/share/doc:%{_docdir}/%{name}:
s:/usr/share:%{_datadir}:
s:/usr/lib:%{_libdir}:
' install.sh

%build

%install
./install.sh --package %{buildroot}
%if %{have_lang}
%find_lang %{name}
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}/
%{_datadir}/nautilus-python/extensions/nautilus_terminal.py
%{_datadir}/nautilus-terminal/

%if %{have_lang}

%files lang -f %{name}.lang
%endif

%changelog
openSUSE Build Service is sponsored by