7bd0dd6
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
7bd0dd6
7bd0dd6
Name:           rapid-photo-downloader
7bd0dd6
Version:        0.0.8
7bd0dd6
Release:        3.b7%{?dist}
7bd0dd6
Summary:        Images downloader for external devices
7bd0dd6
7bd0dd6
Group:          Applications/Archiving
7bd0dd6
License:        GPLv2+
7bd0dd6
URL:            http://damonlynch.net/rapid/
7bd0dd6
Source0:        http://launchpad.net/rapid/0.1.0/%{version}beta7/+download/%{name}-%{version}~b7.tar.gz
7bd0dd6
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
7bd0dd6
BuildArch:      noarch
7bd0dd6
7bd0dd6
BuildRequires:  python
7bd0dd6
BuildRequires:  python-setuptools-devel
7bd0dd6
7bd0dd6
BuildRequires:  desktop-file-utils
7bd0dd6
7bd0dd6
Requires:       hicolor-icon-theme
7bd0dd6
Requires:       pyexiv2
7bd0dd6
Requires:       gtk2
7bd0dd6
Requires:       pygtk2
7bd0dd6
Requires:       gnome-python2-gconf
7bd0dd6
Requires:       gnome-python2
7bd0dd6
Requires:       notify-python
7bd0dd6
7bd0dd6
7bd0dd6
%description
7bd0dd6
Rapid Photo Downloader is written by a photographer for professional
7bd0dd6
and amateur photographers. It can download photos from multiple memory
7bd0dd6
cards and Portable Storage Devices simultaneously. It provides a variety
7bd0dd6
of options for sub-folder creation, image renaming and backup.
7bd0dd6
It does not download images directly from a camera unless the camera
7bd0dd6
is recognized as an external drive.
7bd0dd6
7bd0dd6
7bd0dd6
%prep
7bd0dd6
%setup -q -n %{name}-%{version}~b7
7bd0dd6
#Remove shebang
7bd0dd6
for Files in rapid/media.py rapid/common.py rapid/misc.py \
7bd0dd6
  rapid/renamesubfolderprefstest.py rapid/renamesubfolderprefs.py \
7bd0dd6
  rapid/metadata.py rapid/rapid.py rapid/tableplusminus.py; do
7bd0dd6
  %{__sed} -i.orig -e 1d ${Files}
7bd0dd6
  touch -r ${Files}.orig ${Files}
7bd0dd6
  %{__rm} ${Files}.orig
7bd0dd6
done
7bd0dd6
7bd0dd6
7bd0dd6
%build
7bd0dd6
python ./setup.py build
7bd0dd6
7bd0dd6
7bd0dd6
%install
7bd0dd6
rm -rf %{buildroot}
7bd0dd6
python ./setup.py install -O1 --skip-build --root=%{buildroot}
7bd0dd6
desktop-file-install                                        \
7bd0dd6
    --dir=%{buildroot}%{_datadir}/applications              \
7bd0dd6
    %{buildroot}%{_datadir}/applications/%{name}.desktop
7bd0dd6
7bd0dd6
%clean
7bd0dd6
rm -rf %{buildroot}
7bd0dd6
7bd0dd6
7bd0dd6
%post
7bd0dd6
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
7bd0dd6
7bd0dd6
%postun
7bd0dd6
if [ $1 -eq 0 ] ; then
7bd0dd6
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
7bd0dd6
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
7bd0dd6
fi
7bd0dd6
7bd0dd6
%posttrans
7bd0dd6
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
7bd0dd6
7bd0dd6
7bd0dd6
%files
7bd0dd6
%defattr(-,root,root,-)
7bd0dd6
%doc rapid/AUTHORS rapid/ChangeLog README rapid/TODO
7bd0dd6
%{_bindir}/%{name}
7bd0dd6
%{python_sitelib}/rapid/
7bd0dd6
%{python_sitelib}/*.egg-info
7bd0dd6
%{_datadir}/applications/%{name}.desktop
7bd0dd6
%{_datadir}/icons/hicolor/*x*/apps/%{name}.png
7bd0dd6
%{_datadir}/pixmaps/%{name}.png
7bd0dd6
%{_datadir}/pixmaps/%{name}.xpm
7bd0dd6
7bd0dd6
7bd0dd6
%changelog
7bd0dd6
* Sat Apr 25 2009 Fabian Affolter <fabian@bernewireless.net> - 0.0.8-3.b7
7bd0dd6
- Added update of the icon cache
7bd0dd6
- Fixed license
7bd0dd6
7bd0dd6
* Sat Apr 25 2009 Fabian Affolter <fabian@bernewireless.net> - 0.0.8-2.b7
7bd0dd6
- Added notify-python as a requirement
7bd0dd6
7bd0dd6
* Sun Apr 12 2009 Fabian Affolter <fabian@bernewireless.net> - 0.0.8-1.b7
7bd0dd6
- Updated to new upstream version b7
7bd0dd6
7bd0dd6
* Wed Apr 8 2009 Fabian Affolter <fabian@bernewireless.net> - 0.0.8-1.b6
7bd0dd6
- Initial package for Fedora