File terminator.spec of Package terminator

#
# spec file for package terminator
#
# Copyright (c) 2013 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/
#


Name:           terminator
Version:        0.97
Release:        0
Summary:        Store and run multiple GNOME terminals in one window
License:        GPL-2.0
Group:          System/X11/Terminals
Url:            http://www.tenshu.net/terminator
Source0:        terminator-%{version}.tar.bz2
Patch0:         terminator-desktop.patch
BuildRequires:  desktop-file-utils
BuildRequires:  fdupes
BuildRequires:  gettext
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
Requires:       python-gnome
%if 0%{?suse_version} > 1130
Requires:       python-vte
Requires:       vte
%endif
Recommends:     %{name}-lang
Recommends:     python-keybinder
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%else
BuildArch:      noarch
%endif

%description
Multiple GNOME terminals in one window.  This is a project to produce
an efficient way of filling a large area of screen space with
terminals. This is done by splitting the window into a resizeable
grid of terminals. As such, you can  produce a very flexible
arrangements of terminals for different tasks.

%lang_package
%prep
%setup -q
%patch0
#translation-update-upstream

%build
python setup.py build
#remove unsupported translations
for trans in ms jv af ur ka oc si fy tyv; do
    rm -R ./build/mo/${trans}
done

%install
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
rm -f %{buildroot}/%{_datadir}/icons/hicolor/icon-theme.cache
rm -f %{buildroot}/%{_datadir}/applications/%{name}.desktop
desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications data/%{name}.desktop
%suse_update_desktop_file %{name}
%fdupes %{buildroot}
%find_lang %{name}

%post
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :

%postun
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :

%files
%defattr(-,root,root)
%doc ChangeLog COPYING README
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1*
%{_mandir}/man5/%{name}_config.5*
%{_bindir}/terminator
%{_bindir}/remotinator

%{_datadir}/icons/hicolor/*/*/termina*
%{_datadir}/pixmaps/terminator.png
%{python_sitelib}/*

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by