rpms/deluge/devel deluge-setup.py-dont-store-the-install-dir.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 deluge-setup.py-build-against-system-libtorrent.patch, 1.1, 1.2 deluge.spec, 1.3, 1.4 sources, 1.3, 1.4

Peter Gordon (pgordon) fedora-extras-commits at redhat.com
Sat Mar 3 05:24:22 UTC 2007


Author: pgordon

Update of /cvs/extras/rpms/deluge/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32708

Modified Files:
	.cvsignore 
	deluge-setup.py-build-against-system-libtorrent.patch 
	deluge.spec sources 
Added Files:
	deluge-setup.py-dont-store-the-install-dir.patch 
Log Message:
Update to new upstream release (0.5 Beta 3).

deluge-setup.py-dont-store-the-install-dir.patch:

--- NEW FILE deluge-setup.py-dont-store-the-install-dir.patch ---
--- setup.py.after-use-system-libtorrent-patch	2007-03-02 20:28:40.000000000 -0800
+++ setup.py	2007-03-02 20:30:06.000000000 -0800
@@ -72,67 +72,6 @@
 for plugin in glob.glob('plugins/*'):
 	data.append( ('share/deluge/' + plugin, glob.glob(plugin + '/*')) )
 
-# Thanks to Iain Nicol for code to save the location for installed prefix
-# At runtime, we need to know where we installed the data to.
-import shutil
-from distutils import cmd
-from distutils.command.install import install as _install
-
-class write_data_install_path(cmd.Command):
-	description = 'saves the data installation path for access at runtime'
-	
-	def initialize_options(self):
-		self.data_install_dir = None
-		self.lib_build_dir = None
-
-	def finalize_options(self):
-		self.set_undefined_options('install',
-			('install_data', 'data_install_dir')
-		)		
-		self.set_undefined_options('build',
-			('build_lib', 'lib_build_dir')
-		)
-
-	def run(self):
-		conf_filename = os.path.join(self.lib_build_dir,
-			'deluge', 'dcommon.py')
-
-		conf_file = open(conf_filename, 'r')
-		data = conf_file.read()
-		conf_file.close()
-		data = data.replace('@datadir@', self.data_install_dir)
-
-		conf_file = open(conf_filename, 'w')
-		conf_file.write(data)
-		conf_file.close()
-
-class unwrite_data_install_path(cmd.Command):
-	description = 'undoes write_data_install_path'
-
-	def initialize_options(self):
-		self.lib_build_dir = None
-
-	def finalize_options(self):		
-		self.set_undefined_options('build',
-			('build_lib', 'lib_build_dir')
-		)
-
-	def run(self):
-		dest = os.path.join(self.lib_build_dir,
-			'deluge', 'dcommon.py')
-		shutil.copyfile('src/dcommon.py', dest)
-
-class install(_install):
-	sub_commands = [('write_data_install_path', None)] + \
-		_install.sub_commands + [('unwrite_data_install_path', None)]
-
-cmdclass = {
-	'install': install,
-	'write_data_install_path': write_data_install_path,
-	'unwrite_data_install_path': unwrite_data_install_path,
-}
-
-
 setup(name="deluge", fullname="Deluge BitTorrent Client", version="0.4.90.3",
 	author="Zach Tibbitts, Alon Zakai",
 	author_email="zach at collegegeek.org, kripkensteiner at gmail.com",
@@ -144,6 +83,5 @@
 	package_dir = {'deluge': 'src'},
 	data_files=data,
 	ext_package='deluge',
-	ext_modules=[deluge_core],
-	cmdclass=cmdclass
+	ext_modules=[deluge_core]
 	)


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/deluge/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	25 Feb 2007 01:01:05 -0000	1.3
+++ .cvsignore	3 Mar 2007 05:23:50 -0000	1.4
@@ -1 +1 @@
-deluge-0.4.90.2.tar.gz
+deluge-0.4.90.3.tar.gz

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

Index: deluge-setup.py-build-against-system-libtorrent.patch
===================================================================
RCS file: /cvs/extras/rpms/deluge/devel/deluge-setup.py-build-against-system-libtorrent.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- deluge-setup.py-build-against-system-libtorrent.patch	25 Feb 2007 01:01:05 -0000	1.1
+++ deluge-setup.py-build-against-system-libtorrent.patch	3 Mar 2007 05:23:50 -0000	1.2
@@ -1,90 +1,88 @@
---- setup.py.old	2007-02-24 16:44:31.000000000 -0800
-+++ setup.py	2007-02-24 16:47:43.000000000 -0800
-@@ -1,4 +1,6 @@
- # Copyright (c) 2006 Zach Tibbitts ('zachtib') <zach at collegegeek.org>
-+# Modified by Peter Gordon ('codergeek42') <peter at thecodergeek.com> to build
-+# against a system-installed copy of libtorrent, not the included sources.
+--- setup.py.old	2007-03-02 20:14:51.000000000 -0800
++++ setup.py	2007-03-02 20:17:03.000000000 -0800
+@@ -29,16 +29,11 @@
+ 
+ 
  #
- # 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
-@@ -24,20 +26,15 @@
- 
- pythonVersion = platform.python_version()[0:3]
- 
--removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
- additions = ['-DNDEBUG', '-O2']
- 
- if pythonVersion == '2.5':
- 	cv_opt = sysconfig.get_config_vars()["CFLAGS"]
--	for removal in removals:
--		cv_opt = cv_opt.replace(removal, " ")
- 	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 removal in removals:
--		cv_opt = cv_opt.replace(removal, " ")
- 	for addition in additions:
- 		cv_opt = cv_opt + " " + addition
- 	sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split())
-@@ -46,46 +43,11 @@
+-# NOTE: The following "hack" removes the -g and -Wstrict-prototypes
+-# build options from the command that will compile the C++ module,
++# NOTE: The following "hack" removes the -Wstrict-prototypes
++# build option from the command that will compile the C++ module,
+ # deluge_core.  While we understand that you aren't generally
+-# encouraged to do this, we have done so for the following reasons:
+-# 1) The -g compiler option produces debugging information about
+-#	the compiled module.  However, this option increases the 
+-#	size of deluge_core.so from ~1.9MB to 13.6MB and slows down
+-#	the program's execution without offering any benefits 
+-#	whatsoever.
+-# 2) -Wstrict-prototypes is not a valid C++ build option, and the
++# encouraged to do this, we have done so for the following reason(s):
++# 1) -Wstrict-prototypes is not a valid C++ build option, and the
+ #	compiler will throw a number of warnings at compile time.
+ #	While this does not really impact anything, it makes it
+ #	seem as if something is going wrong with the compile, and
+@@ -60,60 +55,11 @@
  
  
+ 
+-#
+-# NOTE: The Rasterbar Libtorrent source code is in the libtorrent/ directory
+-# inside of Deluge's source tarball.  On several occasions, it has been 
+-# pointed out to us that we should build against the system's installed 
+-# libtorrent rather than our internal copy, and a few people even submitted
+-# patches to do just that. However, as of now, this version
+-# of libtorrent is not available in Debian, and as a result, Ubuntu. Once
+-# libtorrent-rasterbar is available in the repositories of these distributions,
+-# we will probably begin to build against a system libtorrent, but at the
+-# moment, we are including the source code to make packaging on Debian and
+-# Ubuntu possible.
+-#
  deluge_core = Extension('deluge_core',
--                    include_dirs = ['./libtorrent', './libtorrent/include', './libtorrent/include/libtorrent',
--												'/usr/include/python' + pythonVersion],
+-                    include_dirs = ['./libtorrent', './libtorrent/include', 
+-                    			'./libtorrent/include/libtorrent', 
+-                    			'/usr/include/python' + pythonVersion],
 -                    libraries = ['boost_filesystem', 'boost_date_time',
--											'boost_program_options', 'boost_regex',
--											'boost_serialization', 'boost_thread', 'z', 'pthread'],
+-					'boost_program_options', 'boost_regex',
+-					'boost_serialization', 'boost_thread', 
+-					'z', 'pthread'],
 -                    extra_compile_args = ["-Wno-missing-braces"],
 -                    sources = ['src/deluge_core.cpp',
--                    					 'libtorrent/src/alert.cpp',
--										 'libtorrent/src/allocate_resources.cpp',
--										 'libtorrent/src/bt_peer_connection.cpp',
--										 'libtorrent/src/entry.cpp',
--										 'libtorrent/src/escape_string.cpp',
--										 'libtorrent/src/file.cpp',
--										 'libtorrent/src/http_tracker_connection.cpp',
--					                	 'libtorrent/src/identify_client.cpp',
--										 'libtorrent/src/ip_filter.cpp',
-- 										 'libtorrent/src/peer_connection.cpp',
--						             	 'libtorrent/src/piece_picker.cpp',     
--										 'libtorrent/src/policy.cpp',       
--					                	 'libtorrent/src/session.cpp',   
--					                	 'libtorrent/src/session_impl.cpp',
--                               			 'libtorrent/src/sha1.cpp',
--									     'libtorrent/src/stat.cpp',
--									     'libtorrent/src/storage.cpp',
--								       	 'libtorrent/src/torrent.cpp',
--										 'libtorrent/src/torrent_handle.cpp',
--										 'libtorrent/src/torrent_info.cpp',
--										 'libtorrent/src/tracker_manager.cpp',
--										 'libtorrent/src/udp_tracker_connection.cpp',
--					                	 'libtorrent/src/web_peer_connection.cpp',
--										 'libtorrent/src/kademlia/closest_nodes.cpp',
--										 'libtorrent/src/kademlia/dht_tracker.cpp',
--										 'libtorrent/src/kademlia/find_data.cpp',
--										 'libtorrent/src/kademlia/node.cpp',
--										 'libtorrent/src/kademlia/node_id.cpp',
--										 'libtorrent/src/kademlia/refresh.cpp',
--										 'libtorrent/src/kademlia/routing_table.cpp',
--										 'libtorrent/src/kademlia/rpc_manager.cpp',
--										 'libtorrent/src/kademlia/traversal_algorithm.cpp'])
--
+-					'libtorrent/src/alert.cpp',
+-					'libtorrent/src/allocate_resources.cpp',
+-					'libtorrent/src/bt_peer_connection.cpp',
+-					'libtorrent/src/entry.cpp',
+-					'libtorrent/src/escape_string.cpp',
+-					'libtorrent/src/file.cpp',
+-					'libtorrent/src/http_tracker_connection.cpp',
+-					'libtorrent/src/identify_client.cpp',
+-					'libtorrent/src/ip_filter.cpp',
+-					'libtorrent/src/peer_connection.cpp',
+-					'libtorrent/src/piece_picker.cpp',     
+-					'libtorrent/src/policy.cpp',       
+-					'libtorrent/src/session.cpp',   
+-					'libtorrent/src/session_impl.cpp',
+-					'libtorrent/src/sha1.cpp',
+-					'libtorrent/src/stat.cpp',
+-					'libtorrent/src/storage.cpp',
+-					'libtorrent/src/torrent.cpp',
+-					'libtorrent/src/torrent_handle.cpp',
+-					'libtorrent/src/torrent_info.cpp',
+-					'libtorrent/src/tracker_manager.cpp',
+-					'libtorrent/src/udp_tracker_connection.cpp',
+-					'libtorrent/src/web_peer_connection.cpp',
+-						'libtorrent/src/kademlia/closest_nodes.cpp',
+-						'libtorrent/src/kademlia/dht_tracker.cpp',
+-						'libtorrent/src/kademlia/find_data.cpp',
+-						'libtorrent/src/kademlia/node.cpp',
+-						'libtorrent/src/kademlia/node_id.cpp',
+-						'libtorrent/src/kademlia/refresh.cpp',
+-						'libtorrent/src/kademlia/routing_table.cpp',
+-						'libtorrent/src/kademlia/rpc_manager.cpp',
+-						'libtorrent/src/kademlia/traversal_algorithm.cpp'])
 +	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'])
-+	
+ 
  data = [('share/deluge/glade',  glob.glob('glade/*.glade')),
          ('share/deluge/pixmaps', glob.glob('pixmaps/*.png')),
-         ('share/applications' , ['deluge.desktop']),
-@@ -104,6 +66,6 @@
- 	packages=['deluge'],
- 	package_dir = {'deluge': 'src'},
- 	data_files=data,
--    ext_package='deluge',
-+	ext_package='deluge',
- 	ext_modules=[deluge_core]
- 	)


Index: deluge.spec
===================================================================
RCS file: /cvs/extras/rpms/deluge/devel/deluge.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- deluge.spec	25 Feb 2007 19:42:32 -0000	1.3
+++ deluge.spec	3 Mar 2007 05:23:50 -0000	1.4
@@ -2,8 +2,8 @@
 %{!?python_sitearch: %define 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}
+Version:	0.4.90.3
+Release:	1%{?dist}
 Summary:	A Python BitTorrent client with support for UPnP and DHT
 Group:		Applications/Editors
 License:	GPL
@@ -12,6 +12,7 @@
 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
+Patch2:		%{name}-setup.py-dont-store-the-install-dir.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -38,9 +39,13 @@
 %setup -q
 %patch0 -b .use-system-libtorrent
 %patch1 -b .64bit-python_long
+%patch2 -b .dont-store-the-install-dir
 
 
 %build
+## We forcibly don't store the installation directory during the build, so
+## we need to ensure that it is properly inserted into the code as required.
+%{__sed} -i -e "s:INSTALL_PREFIX = '@datadir@':INSTALL_PREFIX = '%{_usr}':" src/dcommon.py
 CFLAGS="%{optflags}" %{__python} setup.py build
 
 
@@ -84,6 +89,12 @@
 
 
 %changelog
+* Fri Mar 02 2007 Peter Gordon <peter at thecodergeek.com> - 0.4.90.3-1
+- Update to new upstream release (0.5 Beta 3).
+- Add patch to fix storing of installation directory:
+  + setup.py-dont-store-the-install-dir.patch
+    (to be applied after 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/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	25 Feb 2007 01:01:05 -0000	1.3
+++ sources	3 Mar 2007 05:23:50 -0000	1.4
@@ -1 +1 @@
-0c8676b6dcd9ba067de5d7e3e892841c  deluge-0.4.90.2.tar.gz
+eecdbae003a9240d93ec023d7a81cd97  deluge-0.4.90.3.tar.gz




More information about the fedora-extras-commits mailing list