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) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Togan Muftuoglu
# Copyright (c) 2009-2011 Pascal Blesser
# 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

Name:           rapid-photo-downloader
Version:        0.4.10
Release:        0
Summary:        Rapid Photo Downloader
License:        GPL-2.0+
Group:          Productivity/Graphics/Other
Source99:       %{name}-rpmlintrc
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
BuildArch:      noarch
Requires:       dbus-1-python
%if 0%{?suse_version} <= 1210
Requires:       exiftool
Requires:       perl-Image-ExifTool
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

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.

%setup -q
rm rapid/*

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

python ./ build

python ./ install \
    --prefix="%{_prefix}" \
    --root=%{buildroot} \


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
%attr(0755,root,root) %{_bindir}/rapid-photo-downloader

openSUSE Build Service is sponsored by