File folder-color.spec of Package folder-color

#
# spec file for package folder-color
#
# Copyright (c) 2015 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 _name   folder_color
%define _version 0.0.7x
Name:           folder-color
Version:        0.0.78
Release:        0
Summary:        Change a directory colour in Caja and Nautilus
License:        GPL-3.0+
Group:          Productivity/File utilities
Url:            https://launchpad.net/folder-color
Source0:        https://launchpad.net/%{name}/trunk/%{_version}/+download/%{name}-common_%{version}.tar.gz
Source1:        https://launchpad.net/%{name}/trunk/%{_version}/+download/%{name}-caja_%{version}.tar.gz
Source2:        https://launchpad.net/%{name}/trunk/%{_version}/+download/%{name}_%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  python
BuildRequires:  python-distutils-extra
BuildArch:      noarch

%description
Change a directory colour, then get better visual layout.

%package caja
Summary:        Change a directory colour in Caja
Group:          Productivity/File utilities
Requires:       %{name}-common = %{version}
Requires:       caja
Requires:       python-caja

%description caja
Change a directory colour, then get better visual layout.

%package nautilus
Summary:        Change a directory colour in Nautilus
Group:          Productivity/File utilities
Requires:       %{name}-common = %{version}
Requires:       nautilus
Requires:       python-nautilus

%description nautilus
Change a directory colour, then get better visual layout.

%package common
Summary:        Change a directory colour in Caja and Nautilus
Group:          Productivity/File utilities
Requires:       gtk3-tools
Requires:       gvfs
Recommends:     %{name}-common-lang = %{version}

%description common
Change a directory colour, then get better visual layout.

%lang_package -n %{name}-common

%prep
%setup -q -n %{name}-common
%setup -q -D -T -a 1 -n %{name}-common
%setup -q -D -T -a 2 -n %{name}-common
mv -f %{name} %{name}-nautilus

chmod a-x COPYING.GPL3
sed -i '/name/s/%{name}/%{name}-nautilus/' %{name}-nautilus/setup.py

%build
# Nothing to build.

%install
for dir in . %{name}-caja %{name}-nautilus; do
    pushd $dir
    python2 setup.py install --root=%{buildroot}
    popd
done
%fdupes %{buildroot}%{_datadir}
%find_lang %{name}-common

%post common
%icon_theme_cache_post

%postun common
%icon_theme_cache_postun

%files caja
%defattr(-,root,root)
%doc COPYING.GPL3
%{_datadir}/caja-python/
%{python_sitelib}/%{_name}_caja-*

%files nautilus
%defattr(-,root,root)
%doc COPYING.GPL3
%{_datadir}/nautilus-python/
%{python_sitelib}/%{_name}_nautilus-*

%files common
%defattr(-,root,root)
%doc COPYING.GPL3
%{python_sitelib}/%{_name}_common-*
%{_datadir}/icons/hicolor/*/*/

%files common-lang -f %{name}-common.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by