File gtkrawgallery.spec of Package GTKRawGallery
Name: gtkrawgallery
Version: 0.9.9
Release: 0
Summary: A photo manager and camera raw file processor
License: GPL-3.0
Group: Productivity/Graphics/Viewers
Url: http://sourceforge.net/projects/gtkrawgallery/
Source: gtkrawgallery-%version.tar.bz2
Source1: gtkrawgallery.desktop
# setup.py.patch: removes python-gdata from the sources, python-gdata is provided by disto repositories
# documents will be installed in the /usr/share/doc/packages/gtkrawgallery
Patch1: setup.py.patch
# gtkrawgallery.py.patch: fixes path to COPYING.txt, changed by setup.py.patch
Patch2: gtkrawgallery.py.patch
%if !0%{?sles_version}
BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: fdupes
%if 0%{?sles_version} == 10
BuildRequires: python
%else
BuildRequires: python-base
%endif
BuildRequires: update-desktop-files
Requires: perl-Image-ExifTool
Requires: python-gdata
Requires: python-gtk >= 2.4
Requires: python-numpy >= 1.0.4
Requires: ImageMagick >= 6.4.9
Requires: dcraw >= 8.93
%py_requires
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%description
GTKRawGallery is an image viewer with support for camera raw files. It is
also an album manager and conversion tool.
%prep
%setup
%patch1
%patch2
find ./ -name *\*~ -print -delete
find ./ -name *\*.pyc -print -delete
find ./ -name *\*Thumbs.db -print -delete
find . -name *\*.py -exec sed -i 's/\r$//' {} \;
find . -name *\*.txt -exec sed -i 's/\r$//' {} \;
sed -i 's/\r$//' uninstall-gtkrawgallery gtkrawgallery
chmod 644 CHANGELOG.txt COPYING.txt README.txt
%build
%install
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
%__install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%__install -D -m0644 "locale/it/LC_MESSAGES/gtkrawgallery.mo" "%{buildroot}%{_datadir}/locale/it/LC_MESSAGES/gtkrawgallery.mo"
%suse_update_desktop_file gtkrawgallery
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{python_sitelib}/*
%{_bindir}/*gtkrawgallery*
%{_datadir}/applications/gtkrawgallery*
%dir %{_docdir}/gtkrawgallery
%{_docdir}/gtkrawgallery/*
%dir %{_datadir}/gtkrawgallery
%{_datadir}/gtkrawgallery/*
%{_datadir}/pixmaps/gtkrawgallery*
%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
%changelog