diff --git a/.cvsignore b/.cvsignore index ea1d210..e737e7a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -deluge-1.1.0_RC2.tar.bz2 +deluge-1.1.0_RC3.tar.bz2 diff --git a/deluge-fixed-setup.py b/deluge-fixed-setup.py deleted file mode 100644 index 41d89b6..0000000 --- a/deluge-fixed-setup.py +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright (c) 2006 Zach Tibbitts ('zachtib') -# Heavily modified by Peter Gordon ('codergeek42') : -# (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] - -NAME = "deluge" -FULLNAME = "Deluge BitTorrent Client" -VERSION = "0.5.0" -AUTHOR = "Zach Tibbitts, Alon Zakai" -EMAIL = "zach@collegegeek.org, kripkensteiner@gmail.com" -DESCRIPTION = "A bittorrent client written in PyGTK" -URL = "http://deluge-torrent.org" -LICENSE = "GPLv2" - -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=NAME, fullname=FULLNAME, version=VERSION, - author=AUTHOR, author_email=EMAIL, description=DESCRIPTION, - url=URL, license=LICENSE, - scripts=["scripts/deluge"], - packages=['deluge'], - package_dir = {'deluge': 'src'}, - data_files=data, - ext_package='deluge', - ext_modules=[deluge_core], - cmdclass=cmdclass - ) \ No newline at end of file diff --git a/deluge.spec b/deluge.spec index baaea9e..ab94453 100644 --- a/deluge.spec +++ b/deluge.spec @@ -1,20 +1,22 @@ %{!?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)")} +## Since we're using a system copy of rb_libtorrent, we need to ensure that it +## is a very recent version for proper API matching. +%define min_rblibtorrent_ver 0.14.1 + Name: deluge Version: 1.1.0 -Release: 0.1.rc2%{?dist} +Release: 0.2.rc3%{?dist} Summary: A GTK+ BitTorrent client with support for DHT, UPnP, and PEX Group: Applications/Internet License: GPLv2+ URL: http://deluge-torrent.org/ -Source0: http://download.deluge-torrent.org/source/%{version}/%{name}-1.1.0_RC2.tar.bz2 -## Not used for now: Deluge builds against its own internal copy of -## rb_libtorrent. See below for more details. -# Source1: %{name}-fixed-setup.py +Source0: http://download.deluge-torrent.org/source/%{version}/%{name}-1.1.0_RC3.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch BuildRequires: boost-devel BuildRequires: desktop-file-utils @@ -22,9 +24,9 @@ BuildRequires: libtool BuildRequires: openssl-devel BuildRequires: python-devel BuildRequires: python-setuptools -## Not used for now: Deluge builds against its own internal copy of -## rb_libtorrent. See below for more details. -# BuildRequires: rb_libtorrent-devel +## The build script checks for the libtorrent module and skips compiling the +## in-tarball one if this is found. +BuildRequires: rb_libtorrent-python >= %{min_rblibtorrent_ver} Requires: /bin/sh Requires: dbus-python @@ -35,16 +37,7 @@ Requires: pygtk2-libglade Requires: pyOpenSSL Requires: python-setuptools 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 +Requires: rb_libtorrent-python >= %{min_rblibtorrent_ver} %description Deluge is a new BitTorrent client, created using Python and GTK+. It is @@ -56,9 +49,7 @@ even from behind a router with virtually zero configuration of port-forwarding. %prep -%setup -qn "%{name}-1.1.0_RC2" -## Not building against system rb_libtorrent - see above. -# install -m 0755 %{SOURCE1} ./setup.py +%setup -qn "%{name}-1.1.0_RC3" %build @@ -88,7 +79,7 @@ desktop-file-install --vendor fedora \ pushd %{buildroot} find -type f -o -type l \ | sed ' - s:%{buildroot}%{python_sitearch}:: + s:%{buildroot}%{python_sitelib}:: s:^\.:: s:\(.*/deluge/i18n/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: s:^\([^%].*\):: @@ -99,9 +90,9 @@ pushd %{buildroot} ## dirs. We can't just glob in the %%files, as that would add duplicate ## entries for the .mo files which we've already marked with appropriate ## %%lang-fu. - find ./%{python_sitearch}/deluge -not -iname '%{name}.mo' -type f \ + find ./%{python_sitelib}/deluge -not -iname '%{name}.mo' -type f \ | sed 's:^\./::' >> %{name}.filelist - find ./%{python_sitearch}/deluge -not -iname '%{name}.mo' -type d \ + find ./%{python_sitelib}/deluge -not -iname '%{name}.mo' -type d \ | sed 's:^\./:%%dir :' >> %{name}.filelist ## Now we move that list back to our sources, so that '%%files -f' can find it ## properly. @@ -115,7 +106,7 @@ rm -rf %{buildroot} %files -f %{name}.filelist %defattr(-,root,root,-) %doc ChangeLog -%{python_sitearch}/%{name}-1.1.0_RC2-py?.?.egg-info +%{python_sitelib}/%{name}-1.1.0_RC3-py?.?.egg-info/ %{_bindir}/%{name} %{_bindir}/%{name}d %{_datadir}/applications/fedora-%{name}.desktop @@ -142,6 +133,15 @@ fi %changelog +* Thu Jan 06 2009 Peter Gordon - 1.1.0-0.2.rc3 +- Update to new upstream release candidate (1.1.0 RC3) +- Build against the system rb_libtorrent instead of using the in-tarball copy + (requires rb_libtorrent 0.14+), and adjust dependencies accordingly. Drop + the hacked setup.py script formerly used to enable this (fixed upstream): + - fixed-setup.py +- Make it a noarch package now that it's just python scripts and related + data files (translations, images, etc.) + * Mon Dec 29 2008 Peter Gordon - 1.1.0-0.1.rc2 - Update to new upstream release candidate (1.1.0 RC2) diff --git a/sources b/sources index bbb69d0..ccab748 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0d02b33db055f2cdfae58b581741fef6 deluge-1.1.0_RC2.tar.bz2 +1d30c0e8c47159298dee31c0289a908a deluge-1.1.0_RC3.tar.bz2