rpms/deluge/FC-6 deluge-fixed-setup.py, NONE, 1.1 .cvsignore, 1.3, 1.4 deluge.spec, 1.3, 1.4 sources, 1.3, 1.4 deluge-64bit-python_long.patch, 1.1, NONE deluge-setup.py-build-against-system-libtorrent.patch, 1.1, NONE

Peter Gordon (pgordon) fedora-extras-commits at redhat.com
Thu Jul 26 03:10:18 UTC 2007


Author: pgordon

Update of /cvs/extras/rpms/deluge/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31903

Modified Files:
	.cvsignore deluge.spec sources 
Added Files:
	deluge-fixed-setup.py 
Removed Files:
	deluge-64bit-python_long.patch 
	deluge-setup.py-build-against-system-libtorrent.patch 
Log Message:
Update to 0.5.3


--- NEW FILE deluge-fixed-setup.py ---
# Copyright (c) 2006 Zach Tibbitts ('zachtib') <zach at collegegeek.org>
# Heavily modified by Peter Gordon ('codergeek42') <peter at thecodergeek.com>:
# (1) Forcibly build against a system copy of libtorrent (Rasterbar's);
# (2) Don't let the build script hardcode the RPM buildroot install path in the
#  installed files.
# (3) Use proper CFLAGS (e.g., don't strip any)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, write to:
# 	The Free Software Foundation, Inc.,
# 	51 Franklin Street, Fifth Floor
# 	Boston, MA  02110-1301, USA.

import platform, os, os.path, glob
from distutils.core import setup, Extension
from distutils import sysconfig
import shutil
from distutils import cmd
from distutils.command.install import install as _install
from distutils.command.install_data import install_data as _install_data
from distutils.command.build import build as _build
import msgfmt

pythonVersion = platform.python_version()[0:3]

APP_VERSION = "0.4.99.1"

additions = ['-DNDEBUG', '-O2']

if pythonVersion == '2.5':
	cv_opt = sysconfig.get_config_vars()["CFLAGS"]
	for addition in additions:
		cv_opt = cv_opt + " " + addition
	sysconfig.get_config_vars()["CFLAGS"] = ' '.join(cv_opt.split())
else:
	cv_opt = sysconfig.get_config_vars()["OPT"]
	for addition in additions:
		cv_opt = cv_opt + " " + addition
	sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split())


deluge_core = Extension('deluge_core',
	include_dirs = [sysconfig.get_python_inc(), '/usr/include', '/usr/include/libtorrent'],
	libraries = ['boost_filesystem', 'torrent'],
	extra_compile_args = ["-Wno-missing-braces"],
	sources = ['src/deluge_core.cpp'])



class build_trans(cmd.Command):
	description = 'Compile .po files into .mo files'
	
	def initialize_options(self):
		pass

	def finalize_options(self):		
		pass

	def run(self):
		po_dir = os.path.join(os.path.dirname(__file__), 'po')
		for path, names, filenames in os.walk(po_dir):
			for f in filenames:
				if f.endswith('.po'):
					lang = f[:len(f) - 3]
					src = os.path.join(path, f)
					dest_path = os.path.join('build', 'locale', lang, 'LC_MESSAGES')
					dest = os.path.join(dest_path, 'deluge.mo')
					if not os.path.exists(dest_path):
						os.makedirs(dest_path)
					if not os.path.exists(dest):
						print 'Compiling %s' % src
						msgfmt.make(src, dest)
					else:
						src_mtime = os.stat(src)[8]
						dest_mtime = os.stat(dest)[8]
						if src_mtime > dest_mtime:
							print 'Compiling %s' % src
							msgfmt.make(src, dest)

class build(_build):
	sub_commands = _build.sub_commands + [('build_trans', None)]
	def run(self):
		_build.run(self)

class install_data(_install_data):
	def run(self):
		for lang in os.listdir('build/locale/'):
			lang_dir = os.path.join('share', 'locale', lang, 'LC_MESSAGES')
			lang_file = os.path.join('build', 'locale', lang, 'LC_MESSAGES', 'deluge.mo')
			self.data_files.append( (lang_dir, [lang_file]) )
		_install_data.run(self)



cmdclass = {
	'build': build,
	'build_trans': build_trans,
	'install_data': install_data,
}

data = [('share/deluge/glade',  glob.glob('glade/*.glade')),
        ('share/deluge/pixmaps', glob.glob('pixmaps/*.png')),
        ('share/applications' , ['deluge.desktop']),
        ('share/pixmaps' , ['deluge.xpm'])]

for plugin in glob.glob('plugins/*'):
	data.append( ('share/deluge/' + plugin, glob.glob(plugin + '/*')) )

setup(name="deluge", fullname="Deluge BitTorrent Client", version=APP_VERSION,
	author="Zach Tibbitts, Alon Zakai",
	author_email="zach at collegegeek.org, kripkensteiner at gmail.com",
	description="A bittorrent client written in PyGTK",
	url="http://deluge-torrent.org",
	license="GPLv2",
	scripts=["scripts/deluge"],
	packages=['deluge'],
	package_dir = {'deluge': 'src'},
	data_files=data,
	ext_package='deluge',
	ext_modules=[deluge_core],
	cmdclass=cmdclass
	)


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/deluge/FC-6/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	25 Feb 2007 01:08:23 -0000	1.3
+++ .cvsignore	26 Jul 2007 03:09:45 -0000	1.4
@@ -1 +1 @@
-deluge-0.4.90.2.tar.gz
+deluge-0.5.3.tar.gz


Index: deluge.spec
===================================================================
RCS file: /cvs/extras/rpms/deluge/FC-6/deluge.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- deluge.spec	25 Feb 2007 19:45:21 -0000	1.3
+++ deluge.spec	26 Jul 2007 03:09:45 -0000	1.4
@@ -1,76 +1,97 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
 Name:		deluge
-Version:	0.4.90.2
-Release:	2%{?dist}
-Summary:	A Python BitTorrent client with support for UPnP and DHT
-Group:		Applications/Editors
+Version:	0.5.3
+Release:	1%{?dist}
+Summary:	A GTK+ BitTorrent client with support for DHT, UPnP, and PEX
+Group:		Applications/Internet
 License:	GPL
 URL:		http://deluge-torrent.org/           
 
 Source0:	http://deluge-torrent.org/downloads/%{name}-%{version}.tar.gz
-Patch0:		%{name}-setup.py-build-against-system-libtorrent.patch
-Patch1:		%{name}-64bit-python_long.patch
+## Not used for now: Deluge builds against its own internal copy of
+## rb_libtorrent. See below for more details. 
+# Source1:	%{name}-fixed-setup.py
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+BuildRequires:	boost-devel
 BuildRequires:	desktop-file-utils
+BuildRequires:	libtool
+BuildRequires:	openssl-devel
 BuildRequires:	python-devel
-BuildRequires:	rb_libtorrent-devel
+## Not used for now: Deluge builds against its own internal copy of
+## rb_libtorrent. See below for more details. 
+# BuildRequires:	rb_libtorrent-devel
 
 Requires:	/bin/sh
-Requires:	pyxdg
-Requires:	rb_libtorrent
-Requires:	pygtk2-libglade
 Requires:	dbus-python
+Requires:	pygtk2-libglade
+Requires:	pyxdg
+## Deluge is now using its own internal copy of rb_libtorrent, which they have
+## heavily modified. Patches were sent to the upstream rb_libtorrent devs,
+## and Deluge frequently re-syncs with the upstream rb_libtorrent codebase.
+## Their reason for this is that there is no rasterbar-libtorrent package in
+## neither Debian nor its derivatives such as Ubuntu, so they do this to make
+## make it simpler to package...on Debian. @_@
+## However, as of this time, it does not build against a system copy of 0.12
+## or a 0.13 nightly snapshot, so this is the only way to make this software
+## functional. (See also: README.Packagers in the root of the source tarball.)
+# Requires:	rb_libtorrent
+
+## The python-libtorrent bindings were produced by the same upstream authors
+## as Deluge, and Deluge 0.4.x is the only package that depended on it
+## (according to repoquery). Thus, it is safe to make Deluge the upgrade path
+## of the python-libtorrent package since it is no longer needed (or in fact,
+## even developed) as of the 0.5 series. 
+Obsoletes:	python-libtorrent < 0.5
 
 %description
 Deluge is a new BitTorrent client, created using Python and GTK+. It is
 intended to bring a native, full-featured client to Linux GTK+ desktop
 environments such as GNOME and XFCE. It supports features such as DHT
-(Distributed Hash Tables) and UPnP (Universal Plug-n-Play) that allow one to
-more easily share BitTorrent data even from behind a router with virtually
-zero configuration of port-forwarding.
+(Distributed Hash Tables), PEX (µTorrent-compatible Peer Exchange), and UPnP
+(Universal Plug-n-Play) that allow one to more easily share BitTorrent data
+even from behind a router with virtually zero configuration of port-forwarding.
 
 
 %prep
 %setup -q
-%patch0 -b .use-system-libtorrent
-%patch1 -b .64bit-python_long
+## Not building against system rb_libtorrent - see above.
+# install -m 0755 %{SOURCE1} ./setup.py
 
 
 %build
+## FIXME: This should really use %%{?_smp_mflags} or similar for parallel
+## compilations; but the build system on this doesn't support such flags at
+## this time.
 CFLAGS="%{optflags}" %{__python} setup.py build
 
 
 %install
 rm -rf %{buildroot}
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
-desktop-file-install --vendor fedora	\
+desktop-file-install --vendor fedora			\
 	--dir %{buildroot}%{_datadir}/applications	\
-	--copy-name-to-generic-name	\
+	--copy-name-to-generic-name			\
 	--add-mime-type=application/x-bittorrent	\
-	--delete-original	\
+	--delete-original				\
+	--remove-category=Application			\
 	%{buildroot}%{_datadir}/applications/%{name}.desktop
-## ...then strip the unneeded shebang lines from some of the plugins...
-pushd %{buildroot}/%{python_sitearch}/%{name}/
-	for FILE in delugegtk.py delugeplugins.py; do
-		sed -i 1d ${FILE};
-	done
-popd 
+%find_lang %{name}
 
 
 %clean
 rm -rf %{buildroot}
 
 
-%files
+%files -f %{name}.lang
 %defattr(-,root,root,-)
 %doc LICENSE 
 %{python_sitearch}/%{name}/
 %{_datadir}/%{name}/
-%{_datadir}/pixmaps/%{name}.xpm
+%{_datadir}/pixmaps/%{name}.png
 %{_datadir}/applications/fedora-%{name}.desktop
 %{_bindir}/%{name}
 
@@ -84,6 +105,32 @@
 
 
 %changelog
+* Wed Jul 25 2007 Peter Gordon <peter at thecodergeek.com> - 0.5.3-1
+- Update to new upstream release candidate (0.5.3)
+- Drop %%ifarch invocations for 64-bit builds. The internal setup script now
+  properly determines this and adds the AMD64 compiler definition if necessary.
+
+
+* Tue Jul 24 2007 Peter Gordon <peter at thecodergeek.com> - 0.5.2-1
+- Update to new upstream release (0.5.2)
+- Update Summary and %%description to reflect new µTorrent-compatible Peer
+  Exchange ("PEX") functionality.
+- Make Deluge the upgrade path of the now-orphaned python-libtorrent package.
+
+
+* Wed Mar 07 2007 Peter Gordon <peter at thecodergeek.com> - 0.4.99.1-1
+- Update to new upstream release (0.5 RC1).
+- Drop unneeded 64bit-python_long patch; as it seems to cause more trouble than
+  it's worth. Instead, pass -DAMD64 as a compiler flag on 64-bit arches.
+  - 64bit-python_long patch
+  (This should fix the bug where, even though torrents are active, they are not
+  shown in the GtkTreeView listing.)
+- Use rewritten setup.py instead of patching it so much, since it's easier to
+  maintain across version upgrades and whatnot:
+  + fixed-setup.py
+- Remove the setup.py patch (no longer needed, since I'm packaging my own):
+  - setup.py-build-against-system-libtorrent.patch
+
 * Sun Feb 25 2007 Peter Gordon <peter at thecodergeek.com> - 0.4.90.2-2
 - Add patch to fix 64-bit python_long type.
   +  64bit-python_long.patch


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/deluge/FC-6/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	25 Feb 2007 01:08:23 -0000	1.3
+++ sources	26 Jul 2007 03:09:45 -0000	1.4
@@ -1 +1 @@
-0c8676b6dcd9ba067de5d7e3e892841c  deluge-0.4.90.2.tar.gz
+382141fdf1c55dc75a183da02d2239fb  deluge-0.5.3.tar.gz


--- deluge-64bit-python_long.patch DELETED ---


--- deluge-setup.py-build-against-system-libtorrent.patch DELETED ---




More information about the fedora-extras-commits mailing list