1cd4efb
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
eff208d
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
55410b8
55410b8
Name:		deluge
0e4f632
Version:	0.5.9.2
9d25fdd
Release:	1%{?dist}
9c4740e
Summary:	A GTK+ BitTorrent client with support for DHT, UPnP, and PEX
eff208d
Group:		Applications/Internet
73dedb1
License:	GPLv2+
55410b8
URL:		http://deluge-torrent.org/           
55410b8
09df20e
Source0:	http://download.deluge-torrent.org/tarball/%{version}/%{name}-%{version}.tar.gz
eff208d
## Not used for now: Deluge builds against its own internal copy of
eff208d
## rb_libtorrent. See below for more details. 
eff208d
# Source1:	%{name}-fixed-setup.py
09df20e
55410b8
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
55410b8
e275763
BuildRequires:	boost-devel
55410b8
BuildRequires:	desktop-file-utils
26b838a
BuildRequires:	libtool
e275763
BuildRequires:	openssl-devel
eff208d
BuildRequires:	python-devel
eff208d
## Not used for now: Deluge builds against its own internal copy of
eff208d
## rb_libtorrent. See below for more details. 
eff208d
# BuildRequires:	rb_libtorrent-devel
55410b8
55410b8
Requires:	/bin/sh
55eb20b
Requires:	dbus-python
afd4fc2
Requires:	dbus-x11
0cfc93b
## Required for the proper ownership of icon dirs.
0cfc93b
Requires:	hicolor-icon-theme
eff208d
Requires:	pygtk2-libglade
09df20e
Requires:	pyOpenSSL
eff208d
Requires:	pyxdg
eff208d
## Deluge is now using its own internal copy of rb_libtorrent, which they have
eff208d
## heavily modified. Patches were sent to the upstream rb_libtorrent devs,
eff208d
## and Deluge frequently re-syncs with the upstream rb_libtorrent codebase.
eff208d
## Their reason for this is that there is no rasterbar-libtorrent package in
eff208d
## neither Debian nor its derivatives such as Ubuntu, so they do this to make
eff208d
## make it simpler to package...on Debian. @_@
eff208d
## However, as of this time, it does not build against a system copy of 0.12
eff208d
## or a 0.13 nightly snapshot, so this is the only way to make this software
eff208d
## functional. (See also: README.Packagers in the root of the source tarball.)
eff208d
# Requires:	rb_libtorrent
55410b8
5f84903
## The python-libtorrent bindings were produced by the same upstream authors
5f84903
## as Deluge, and Deluge 0.4.x is the only package that depended on it
5f84903
## (according to repoquery). Thus, it is safe to make Deluge the upgrade path
5f84903
## of the python-libtorrent package since it is no longer needed (or in fact,
5f84903
## even developed) as of the 0.5 series. 
5f84903
Obsoletes:	python-libtorrent < 0.5
5f84903
55410b8
%description
55410b8
Deluge is a new BitTorrent client, created using Python and GTK+. It is
55410b8
intended to bring a native, full-featured client to Linux GTK+ desktop
55410b8
environments such as GNOME and XFCE. It supports features such as DHT
e275763
(Distributed Hash Tables), PEX (ĀµTorrent-compatible Peer Exchange), and UPnP
e275763
(Universal Plug-n-Play) that allow one to more easily share BitTorrent data
e275763
even from behind a router with virtually zero configuration of port-forwarding.
55410b8
55410b8
55410b8
%prep
0cfc93b
%setup -qn "deluge-torrent-%{version}"
eff208d
## Not building against system rb_libtorrent - see above.
eff208d
# install -m 0755 %{SOURCE1} ./setup.py
55410b8
55410b8
55410b8
%build
1cd4efb
## FIXME: This should really use %%{?_smp_mflags} or similar for parallel
6c7081e
## compilations; but the build system on this doesn't support such flags at
6c7081e
## this time.
9c4740e
CFLAGS="%{optflags}" %{__python} setup.py build
55410b8
55410b8
55410b8
%install
55410b8
rm -rf %{buildroot}
55eb20b
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
c1c8884
## Fix the Icon name in the .desktop file: it shouldn't contain an extension.
c1c8884
sed -i -e 's/Icon=deluge.png/Icon=deluge/' %{buildroot}%{_datadir}/applications/%{name}.desktop
9c4740e
desktop-file-install --vendor fedora			\
55410b8
	--dir %{buildroot}%{_datadir}/applications	\
9c4740e
	--copy-name-to-generic-name			\
55eb20b
	--add-mime-type=application/x-bittorrent	\
9c4740e
	--delete-original				\
9c4740e
	--remove-category=Application			\
55eb20b
	%{buildroot}%{_datadir}/applications/%{name}.desktop
899f010
%find_lang %{name}
55410b8
55410b8
55410b8
%clean
55410b8
rm -rf %{buildroot}
55410b8
55410b8
899f010
%files -f %{name}.lang
55410b8
%defattr(-,root,root,-)
55eb20b
%doc LICENSE 
55eb20b
%{python_sitearch}/%{name}/
1e12e15
%{python_sitearch}/%{name}-%{version}-py2.5.egg-info
0cfc93b
%{_bindir}/%{name}
55eb20b
%{_datadir}/%{name}/
55410b8
%{_datadir}/applications/fedora-%{name}.desktop
0cfc93b
%{_datadir}/pixmaps/%{name}.png
0cfc93b
%{_datadir}/icons/hicolor/*/apps/%{name}.png
55410b8
afd4fc2
55410b8
%post
55410b8
update-desktop-database &>/dev/null ||:
96ba887
touch --no-create %{_datadir}/icons/hicolor
96ba887
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
96ba887
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
96ba887
fi
55410b8
55410b8
55410b8
%postun
55410b8
update-desktop-database &> /dev/null ||:
96ba887
touch --no-create %{_datadir}/icons/hicolor
96ba887
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
96ba887
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
96ba887
fi
55410b8
55410b8
55410b8
%changelog
0e4f632
* Tue Jun 24 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.9.2-1
0e4f632
- Update to new upstream release (0.5.9.2)
0e4f632
f74fec6
* Fri May 23 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.9.1-1
f74fec6
- Update to new upstream release (0.5.9.1)
f74fec6
24fae4d
* Fri May 02 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.9.0-1
24fae4d
- Update to new upstream release (0.5.9.0)
24fae4d
- Drop upstreamed default-preferences patch for disabling new version
24fae4d
  notifications:
24fae4d
  - default-prefs-no-release-notifications.patch
24fae4d
4f3f53a
* Tue Apr 15 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8.9-1
4f3f53a
- Update to new upstream release (0.5.8.9)
4f3f53a
b7d571a
* Wed Mar 26 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8.7-1
b7d571a
- Update to new upstream release (0.5.8.7)
b7d571a
87b3450
* Mon Mar 17 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8.6-1
87b3450
- Update to new upstream release (0.5.8.6)
87b3450
b24b338
* Fri Feb 29 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8.5-1
b24b338
- Update to new upstream release (0.5.8.5)
b24b338
ec4f48f
* Sat Feb 16 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8.4-1
9c31d05
- Update to new upstream release (0.5.8.4)
9c31d05
- Rebuild for GCC 4.3
9c31d05
dabce6c
* Mon Jan 28 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8.3-1
dabce6c
- Update to new upstream security fix release (0.5.8.3), which includes a fix
dabce6c
  for a potential remotely-exploitable stack overflow with a malformed
dabce6c
  bencoded message.
dabce6c
9d25fdd
* Sat Jan 19 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8.1-1
9d25fdd
- Update to new upstream bugfix release (0.5.8.1)
9d25fdd
afd4fc2
* Wed Jan 09 2008 Peter Gordon <peter@thecodergeek.com> - 0.5.8-3
afd4fc2
- Add runtime dependency on dbus-x11 for the dbus-launch utility. Fixes bug
afd4fc2
  428106 (Missing BR dbus-x11).
afd4fc2
- Bump release to 3 to maintain a proper F8->F9+ upgrade path.
afd4fc2
b914a06
* Mon Dec 31 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.8-1
b914a06
- Update to new upstream release (0.5.8)
b914a06
- Merge Mamoru Tasaka's no-release-notification patch into the default-prefs
b914a06
  patch.
b914a06
  
f7fb791
* Sat Dec 29 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.5.7.98-1
f7fb791
- Update to new upstream release candidate (0.5.8 RC2)
f7fb791
549e11a
* Mon Dec 24 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.5.7.95-1
549e11a
- Update to new upstream release candidate (0.5.8 RC1)
549e11a
- Completely suppress updates notification (bug 299601, 426642)
549e11a
96ba887
* Sun Dec 09 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.7.1-2
96ba887
- Add missing icon cache %%post and %%postun scriptlets.
1e12e15
- Add missing egg-info to the %%files list.
96ba887
0cfc93b
* Fri Dec 07 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.7.1-1
0cfc93b
- Update to new upstream bug-fix release (0.5.7.1).
0cfc93b
- Sort %%files list (aesthetic-only change).
0cfc93b
c1c8884
* Wed Dec 05 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.7-3
c1c8884
- Fix previous %%changelog Version.
c1c8884
- Cleanup the installed .desktop file. Fixes bug 413101 (deluge fails to build
c1c8884
  in rawhide  bad .desktop file.)
c1c8884
f9eea39
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.5.7-2
c1c8884
- Rebuild for deps
f9eea39
c1c8884
* Tue Nov 24 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.7-1
53e30f9
- Update to new upstream release (0.5.7)
53e30f9
1aed9eb
* Sat Nov 24 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.6.96-1
1aed9eb
- Update to new upstream release candidate (0.5.7 RC2)
1aed9eb
- Drop plugin error patch (fixed upstream):
1aed9eb
  - plugin-not-found-OK.patch
1aed9eb
09df20e
* Sat Nov 24 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.6.95-1
09df20e
- Update to new upstream release candidate (0.5.7 RC)
09df20e
- Update Source0 url
09df20e
- Add upstream patch to prevent dying if plugin in prefs.state is not found on
09df20e
  the filesystem:
09df20e
  + plugin-not-found-OK.patch
09df20e
3161b31
* Wed Oct 31 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.6.2-1
3161b31
- Update to new upstream bug-fix release (0.5.6.2)
3161b31
5a6d8a8
* Tue Oct 30 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.6.1-1
5a6d8a8
- Update to new upstream bug-fix release (0.5.6.1)
5a6d8a8
- Drop use-mt-boost build script patch (fixed upstream):
5a6d8a8
  - use-mt-boost.patch
5a6d8a8
1b034c2
* Sat Oct 27 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.6-1
1b034c2
- Update to new upstream release (0.5.6)
1b034c2
acf39b8
* Wed Oct 17 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.5.95-1
acf39b8
- Update to new upstream release candidate (0.5.6 RC1)
acf39b8
29760ef
* Thu Sep 20 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.5-2
29760ef
- Fix release on previous %%changelog entry.
29760ef
- Disable the version update notifications by default:
29760ef
  + default-prefs-no-release-notifications.patch
29760ef
  (Resolves bug 299601: Deluge alerts of new versions)
29760ef
29760ef
* Wed Sep 12 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.5-1
9d4f0c7
- Update to new upstream release (0.5.5)
9d4f0c7
22746d2
* Mon Sep 03 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.4.1.95-1
22746d2
- Update to new upstream release candidate (0.5.5 RC1)
22746d2
dd00e6b
* Mon Aug 13 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.4.1-1
dd00e6b
- Update to new upstream release (0.5.4.1)
dd00e6b
- Build with new binutils to gain BuildID debugging goodness.
dd00e6b
dd00e6b
* Mon Aug 06 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.4-1
dd00e6b
- Update to new upstream release (0.5.4)
dd00e6b
73dedb1
* Fri Aug 03 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.3-2
73dedb1
- Update License tag (GPLv2+).
2eb8b9f
- Rebuild against new Boost libraries, adding a patch to build against the
2eb8b9f
  multi-threaded ("*-mt") libraries:
2eb8b9f
  + use-mt-boost.patch
73dedb1
ffc00e2
* Wed Jul 25 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.3-1
9c4740e
- Update to new upstream release candidate (0.5.3)
9c4740e
- Drop %%ifarch invocations for 64-bit builds. The internal setup script now
9c4740e
  properly determines this and adds the AMD64 compiler definition if necessary.
9c4740e
1cd4efb
* Fri Jul 20 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.2.90-1
1cd4efb
- Update to new upstream release candidate (0.5.3 RC1)
1cd4efb
- Drop stale persistence fix patch (applied upstream):
1cd4efb
  - fix-persistence-upgrade-rhbz_247927.patch
1cd4efb
426cbbf
* Wed Jul 11 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.2-2
426cbbf
- Add patch to fix the existence of stale persistence files by automatically
426cbbf
  updating the deluge.deluge module name to deluge.core, or removing them if
426cbbf
  empty (bug 247927):
1cd4efb
  + fix-persistence-upgrade-rhbz_247927.patch
426cbbf
eff208d
* Sun Jul 08 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.2-1
eff208d
- Update to new upstream release (0.5.2)
e275763
- Update Summary and %%description to reflect new ĀµTorrent-compatible Peer
e275763
  Exchange ("PEX") functionality.
eff208d
eff208d
* Thu Jun 07 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.0.90.2-2
eff208d
- Update to new upstream release (0.5.1 Beta 2)
eff208d
5f84903
* Sun Apr 08 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.0-2
5f84903
- Make Deluge the upgrade path of the now-orphaned python-libtorrent package.
5f84903
  
e4c475f
* Mon Mar 12 2007 Peter Gordon <peter@thecodergeek.com> - 0.5.0-1
e4c475f
- Update to new upstream release (0.5.0).
e4c475f
26b838a
* Mon Mar 12 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.99.2-1
26b838a
- Update to new upstream release (0.5 RC2).
26b838a
- Drop IndexError exception-handling fix (applied upstream):
26b838a
  - delugegtk.py-fix-IndexError-exception-handling.patch
26b838a
- Use the system libtool instead of the one from the sources to ensure
26b838a
  that no unnecessary RPATH hacks are added to the final build. 
26b838a
df3bbb2
* Wed Mar 07 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.99.1-3
df3bbb2
- Add a patch (submitted upstream) to properly catch a thrown IndexError in
df3bbb2
  state message updates. This should resolve the bug wherein the UI stops
df3bbb2
  updating its details and torrent listing.
df3bbb2
  + delugegtk.py-fix-IndexError-exception-handling.patch
df3bbb2
  
c1cc803
* Wed Mar 07 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.99.1-2
c1cc803
- Drop unneeded 64bit-python_long patch; as it seems to cause more trouble than
c1cc803
  it's worth. Instead, pass -DAMD64 as a compiler flag on 64-bit arches.
c1cc803
  - 64bit-python_long patch
c1cc803
  (This should fix the bug where, even though torrents are active, they are not
c1cc803
  shown in the GtkTreeView listing.)
c1cc803
899f010
* Tue Mar 06 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.99.1-1
899f010
- Update to new upstream release (0.5 RC1).
899f010
- Use rewritten setup.py instead of patching it so much, since it's easier to
899f010
  maintain across version upgrades and whatnot:
899f010
  + fixed-setup.py
899f010
- Remove the setup.py patches (no longer needed, since I'm packaging my own):
899f010
  - setup.py-dont-store-the-install-dir.patch
899f010
  - setup.py-build-against-system-libtorrent.patch
899f010
4581bff
* Fri Mar 02 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.90.3-1
4581bff
- Update to new upstream release (0.5 Beta 3).
4581bff
- Add patch to fix storing of installation directory:
4581bff
  + setup.py-dont-store-the-install-dir.patch
4581bff
    (to be applied after setup.py-build-against-system-libtorrent.patch)
4581bff
78928e8
* Sun Feb 25 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.90.2-2
78928e8
- Add patch to fix 64-bit python_long type.
78928e8
  +  64bit-python_long.patch
78928e8
55eb20b
* Sat Feb 24 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.90.2-1
55eb20b
- Update to new upstream release (0.5 Beta 2)
55eb20b
- Add patch to force building against system copy of rb_libtorrent:
55eb20b
  + setup.py-build-against-system-libtorrent.patch
55eb20b
- Remove python-libtorrent and a few other dependencies that are no longer
78928e8
  used.
55eb20b
55410b8
* Fri Feb 23 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.1-6
55410b8
- Fix Source0 URL.
55410b8
55410b8
* Wed Feb 21 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.1-5 
55410b8
- Make notify-python dependency conditional (FC6+ only)
55410b8
- Strip the unneeded shebang lines from the plugin scripts, since they are not
55410b8
  meant to be directly executed.
55410b8
55410b8
* Wed Feb 07 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.1-4
55410b8
- Update .desktop file: Icon should not have the "-256" size suffix.
55410b8
- Add Requires: notify-python
55410b8
- Remove strict dependency on python 2.3+, since we're targetting FC5+
55410b8
  only, which has 2.4+.
55410b8
55410b8
* Wed Jan 10 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.1-3
55410b8
- Use install instead of the cp/find/chmod fiasco of earlier releases for
55410b8
  clarity and proper permissions setting.
55410b8
- Be more consistent about use of %%{name} and other macros in file naming as
55410b8
  well as whitespace between sections.
55410b8
55410b8
* Sun Jan 07 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.1-2
55410b8
- Bump python-libtorrent dependency to 0.3.0-4, which contains a fix for
55410b8
  64-bit systems.
55410b8
55410b8
* Wed Jan 03 2007 Peter Gordon <peter@thecodergeek.com> - 0.4.1-1
55410b8
- Initial packaging for Fedora Extras.