File sunflower.spec of Package sunflower
#
# spec file for package sunflower
#
# Copyright (c) 2016 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 srcname Sunflower
%define ver 0.3
%define rel 61
Name: sunflower
Version: %{ver}+%{rel}
Release: 0
Summary: Small and highly customizable twin-panel file manager
License: GPL-3.0
Group: Productivity/File utilities
Url: http://sunflower-fm.org/
Source0: https://github.com/MeanEYE/Sunflower/archive/%{ver}-%{rel}.tar.gz#/%{srcname}-%{ver}-%{rel}.tar.gz
Source97: %{name}
Source98: %{srcname}su.desktop
Source99: %{name}su.svg
BuildRequires: python-base
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
BuildRequires: fdupes
Requires: python-chardet
Requires: python-gtk
Recommends: python-argparse
Recommends: python-gnomekeyring
Recommends: python-mutagen
Recommends: python-notify
Recommends: python-setproctitle
Recommends: python-vte
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Sunflower is a small and highly customizable twin-panel file manager with
support for plugins. It is intended to be an easy-to-use and powerful file
manager that seamlessly integrates into the GNOME desktop environment (but
not limited to).
%lang_package
%prep
%setup -q -n %{srcname}-%{ver}-%{rel}
cp %{SOURCE97} .
cp %{SOURCE98} .
cp %{SOURCE99} images/
sed -i 's|@python_sitelib@|%{python_sitelib}|' %{name}
%build
# There is nothing to build.
%install
install -d %{buildroot}{%{_datadir},%{python_sitelib}}/%{name}
cp -r {application,images,%{srcname}.py} %{buildroot}%{python_sitelib}/%{name}
cp -r translations %{buildroot}%{_datadir}/locale
install -Dm0755 %{name} %{buildroot}%{_bindir}/%{name}
for d in *.desktop; do
install -Dm0644 $d %{buildroot}%{_datadir}/applications/$d; done
for i in images/*.svg; do
f=$(basename $i)
install -Dm0644 $i %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/$f; done
%py_compile %{buildroot}%{python_sitelib}/%{name}/application
%suse_update_desktop_file -u %{srcname}su
find %{buildroot} -type f \( -name \*.po -o -name \*.pot \) -delete -print
%find_lang %{name}
%fdupes -s %{buildroot}%{python_sitelib}
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%icon_theme_cache_postun
%desktop_database_postun
%files
%defattr(-,root,root)
%doc AUTHORS CHANGES LICENSE TODO
%{_bindir}/%{name}
%{_datadir}/applications/%{srcname}*desktop
%{_datadir}/icons/hicolor/*/apps/%{name}*svg
%{python_sitelib}/%{name}/
%files lang -f %{name}.lang
%defattr(-,root,root,-)
%changelog