%define name deluge %define version 0.5.4.1 %define release %mkrel 3 # needed to run numerical comparisons on python version %define my_py_ver %(echo %py_ver | tr -d '.') Summary: Bittorrent client based on GTK+ 2 Name: %{name} Version: %{version} Release: %{release} Source0: http://download.deluge-torrent.org/stable/%{name}-%{version}.tar.gz # FOR SYSTEM LIBTORRENT Source1: %{name}-fixed-setup.py # There's a check to see what style the distro uses for Boost libs # in setup.py. It doesn't work for a buildsystem-type environment # as it relies on the existence of /etc/issue , which is generated # at boot time. So let's just patch the check out of existence and # set the variable to the correct value. Patch0: deluge-0.5.4-nomt.patch # Disables the automatic check for a newer version. We don't want it. Patch1: deluge-0.5.4.1-versioncheck.patch License: GPLv2+ Group: Networking/File transfer Url: http://deluge-torrent.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: desktop-file-utils # FOR SYSTEM LIBTORRENT BuildRequires: libtorrent-rasterbar-devel BuildRequires: python-devel BuildRequires: libboost-devel BuildRequires: libz-devel BuildRequires: openssl-devel BuildRequires: ImageMagick Requires: pyxdg %description Deluge is a Bittorrent client written in Python and GTK+. Deluge is intended to bring a native, full-featured client to Linux GTK+ desktop environments such as GNOME and XFCE. %prep %setup -q # French translation doesn't work, causes Deluge to crash on startup # Can't figure out why so let's remove it for now rm -f po/fr.po # FOR SYSTEM LIBTORRENT install -m 0755 %{SOURCE1} ./setup.py %patch0 -p1 -b .nomt %patch1 -p1 -b .versioncheck %build # FOR SYSTEM LIBTORRENT # We forcibly don't store the installation directory during the build, so # FOR SYSTEM LIBTORRENT # we need to ensure that it is properly inserted into the code as required. # FOR SYSTEM LIBTORRENT perl -pi -e "s,INSTALL_PREFIX = '@datadir@',INSTALL_PREFIX = '%{_prefix}',g" \ # FOR SYSTEM LIBTORRENT src/dcommon.py %ifarch x86_64 sparc64 CFLAGS="%{optflags} -DAMD64" python setup.py build %else CFLAGS="%{optflags}" python setup.py build %endif %install rm -rf %{buildroot} python ./setup.py install --root=%{buildroot} perl -pi -e 's,%{name}.png,%{name},g' %{buildroot}%{_datadir}/applications/%{name}.desktop desktop-file-install --vendor="" \ --add-category="GTK" \ --remove-category="Application" \ --add-category="P2P" \ --add-category="FileTransfer" \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/* # There's a method to this madness: use upstream sizes where they # exist, for useful sizes that don't exist, convert from an upstream # size that's an exact multiple. for i in 22 32 48 128 192 256; do install -m 644 -D pixmaps/%{name}$i.png %{buildroot}%{_iconsdir}/hicolor/$ix$i/apps/%{name}.png; done mkdir -p %{buildroot}%{_iconsdir}/hicolor/16x16/apps convert -scale 16 pixmaps/%{name}32.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png rm -f %{buildroot}%{_datadir}/pixmaps/%{name}.xpm %find_lang %{name} %post %{update_icon_cache hicolor} %{update_menus} %{update_desktop_database} %postun %{clean_icon_cache hicolor} %{clean_menus} %{clean_desktop_database} %clean rm -rf %{buildroot} %files -f %{name}.lang %defattr(-,root,root) %doc README %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %if %{my_py_ver} >= 25 %{py_platsitedir}/deluge-%{version}-py* %endif %{py_platsitedir}/%{name} %{_datadir}/%{name} %{_datadir}/pixmaps/%{name}.png %{_iconsdir}/hicolor/*/apps/%{name}.png %changelog * Thu Sep 27 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.4.1-3mdv2008.0 + Revision: 93341 - update icon name fix (png vs. xpm) - remove the French translation, it's broken somehow and I don't know how to fix - re-adopt some of tpg's cleanups - correct license - add deluge-0.5.4.1-versioncheck.patch to disable the new version check - revert to 0.5.4.1 per maintainers@ post + Tomasz Pawel Gajc <tpg@mandriva.org> - spec file clean - handle nicely installation of icons - do not hardcode icon extension in desktop file - new version * Sun Aug 12 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.4.1-1mdv2008.0 + Revision: 62298 - new release 0.5.4.1 * Thu Aug 09 2007 Funda Wang <fundawang@mandriva.org> 0.5.4-1mdv2008.0 + Revision: 60901 - New version 0.5.4 - rediff patch * Fri Jul 27 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.3-1mdv2008.0 + Revision: 56130 - new release 0.5.3 * Sat Jul 21 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.2.90-1mdv2008.0 + Revision: 54331 - test for python version not MDV version in determining whether to include certain python files (this is more correct) - revise size range and generation strategy for fd.o icons - drop old icons - specify license as GPLv2 - clean spec (tabs, consistent variables) - new release 0.5.2.90 (0.5.3 RC1) - bump to retry backport * Fri Jul 06 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.2-1mdv2008.0 + Revision: 49233 - rediff patch0 - new release 0.5.2 * Sun Jul 01 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.1.90-1mdv2008.0 + Revision: 46191 - new release 0.5.1.90 (0.5.2 RC1); rediff patch0 * Sat Jun 16 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.1.1-1mdv2008.0 + Revision: 40349 - okay, try fixing the boost issue another way - fix distro test in setup.py for releases other than 2007.1 - new release 0.5.1.1, some spec cleaning - real fix for 2007.0 build (the file apparently doesn't exist under python 2.4 at all) * Fri Apr 20 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.0-3mdv + Revision: 16367 - fix build on 2007.0 (remove specific reference to python 2.5 file in files list) * Wed Mar 21 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.0-2mdv2007.1 + Revision: 147655 - generate fd.o icons in spec, use them in .desktop * Mon Mar 19 2007 Adam Williamson <awilliamson@mandriva.com> 0.5.0-1mdv2007.1 + Revision: 146380 - drop the patch (fixed upstream) - 0.5.0 final - Import deluge + Michael Scherer <misc@mandriva.org> - fix french translation