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
9c4740e
Version:	0.5.3
1cd4efb
Release:	1%{?dist}
9c4740e
Summary:	A GTK+ BitTorrent client with support for DHT, UPnP, and PEX
eff208d
Group:		Applications/Internet
55410b8
License:	GPL
55410b8
URL:		http://deluge-torrent.org/           
55410b8
55410b8
Source0:	http://deluge-torrent.org/downloads/%{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
55410b8
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
eff208d
Requires:	pygtk2-libglade
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
55410b8
%setup -q
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}
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}/
55eb20b
%{_datadir}/%{name}/
1cd4efb
%{_datadir}/pixmaps/%{name}.png
55410b8
%{_datadir}/applications/fedora-%{name}.desktop
55410b8
%{_bindir}/%{name}
55410b8
55410b8
55410b8
%post
55410b8
update-desktop-database &>/dev/null ||:
55410b8
55410b8
55410b8
%postun
55410b8
update-desktop-database &> /dev/null ||:
55410b8
55410b8
55410b8
%changelog
9c4740e
* Fri Jul 20 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.