File rapid-photo-downloader.spec of Package rapid-photo-downloader

# vim: set ts=4 sw=4 et:
#
# spec file for package rapid-photo-downloader
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Togan Muftuoglu toganm@opensuse.org
# Copyright (c) 2009-2011 Pascal Blesser pascal.bleser@opensuse.org
#
# 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:           rapid-photo-downloader
Version:        0.4.6
Release:        0
Summary:        Rapid Photo Downloader
License:        GPL-2.0+
Group:          Productivity/Graphics/Other
Url:            http://damonlynch.net/rapid/
Source:         http://launchpad.net/rapid/trunk/%{version}/+download/rapid-photo-downloader-%{version}.tar.gz
Source99:       %{name}-rpmlintrc
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif
Requires:       dbus-1-python
%if 0%{?suse_version} <= 1210
Requires:       exiftool
%else
Requires:       perl-Image-ExifTool
%endif
Requires:       exiftran
Requires:       gdk-pixbuf-loader-rsvg
Requires:       python-gconf
Requires:       python-gnome
Requires:       python-gobject2
Requires:       python-gtk
Requires:       python-imaging
Requires:       python-notify
Requires:       python-pyexiv2
%py_requires

%description
Rapid Photo Downloader for Linux is written by a photographer for professional
and amateur photographers. Its goal is to be the best photo downloader for the
Linux Desktop. It is free software, released under the GNU GPL license.

%prep
%setup -q
rm rapid/*test.py

pushd rapid
find . -type f -name '*.py' -exec sed -i -e '/^#!\//, 1d' {} \;
popd #rapid

cp  rapid/{ChangeLog,COPYING,AUTHORS} .
pod2man --section=1 -u --release=%version  --center "" doc/rapid-photo-downloader.pod > %name.1

%build
python ./setup.py build

%install
python ./setup.py install \
    --prefix="%{_prefix}" \
    --root=%{buildroot} \
    --record-rpm=files.lst

d="%{_datadir}"
d="${d#/}"
d="${d%/}"

perl -ni -e 'print unless m,^%dir\s+/?'"$d"'/(applications|pixmaps|icons)$,' files.lst
perl -ni -e 'print unless m|.*/LC_MESSAGES/.*|' files.lst

%find_lang rapid-photo-downloader

cat rapid-photo-downloader.lang files.lst > rpmfiles

%suse_update_desktop_file -r rapid-photo-downloader Graphics Photography

chmod 0755 "%{buildroot}%{_bindir}/rapid-photo-downloader"
perl -ni -e 'print unless m|^%{_bindir}|' rpmfiles
install -d %buildroot/%_mandir/man1
install -m 644 %name.1 %buildroot/%_mandir/man1/

%fdupes -s %buildroot

%files -f rpmfiles
%defattr(-,root,root)
%doc README ChangeLog AUTHORS COPYING
%attr(0755,root,root) %{_bindir}/rapid-photo-downloader
%_mandir/man1/%name.1.gz

%changelog
openSUSE Build Service is sponsored by