Bittorrent .spec patch

Dean Takemori <[email protected]>
Newsgroups gmane.linux.freshrpms.user
Message-ID <[email protected]>
Hello,

In the bittorrent-4.2.2-1.rf.src.rpm specfile, there is a comment  
that says ...

### Requires python >= 2.3, works on 2.2 too (Pasi Pirhonen)

Based on that comment, I've tried the 4.2.2-1.rf version on my FC1  
based system.
(Which has python-2.2).  So far, the console package builds and seems  
to work fine.
As I run my system headless, I have not even tried to build,  
nevermind run the
gui package.

Based on what I've done, I've produced the following patch for the  
4.2.2-1.rf
specfile.  I'm not really fluent in .spec, so the code may be  
substandard, and
my patch only fixes things for FC1, but it's a start.

-dean takemori



--- bittorrent.spec     2005-12-18 06:46:22.000000000 -1000
+++ bittorrent.spec-new 2006-07-06 00:20:30.000000000 -1000
@@ -6,6 +6,12 @@
%define python_sitelib %(%{__python} -c 'from distutils import  
sysconfig; print sysconfig.get_python_lib()')
+%{?dist: %{expand: %%define %dist 1}}
+
+%{?fc1:%define _without_gui 1}
+
+%{?fc1:%define _without_freedesktop 1}
+
%define real_name BitTorrent
%define desktop_vendor rpmforge
@@ -25,9 +31,9 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
-BuildRequires: python-devel >= 2.3, pygtk2-devel >= 2.4
+BuildRequires: python-devel >= 2.2
%{!?_without_freedesktop:BuildRequires: desktop-file-utils}
-Requires: python >= 2.3, python-khashmir, python-crypto
+Requires: python >= 2.2, python-khashmir, python-crypto
Obsoletes: BitTorrent <= %{version}
%description
@@ -37,10 +43,11 @@
bandwidth. With BitTorrent, clients automatically mirror files they
download, making the publisher's burden almost nothing.
+
%package gui
Summary: GUI versions of the BitTorrent file transfer tool
Group: Applications/Internet
-Requires: pygtk2 >= 2.4
+Requires: pygtk2 >= 2.4, pygtk2-devel >= 2.4
Requires: %{name} = %{version}-%{release}
%description gui
@@ -84,6 +91,7 @@
%find_lang %{name}
%{__perl} -pi -e 's|env python2|env python|' %{buildroot}%{_bindir}/*
+%if %{!?_without_gui:1}0
%if %{?_without_freedesktop:1}0
         %{__install} -Dp -m0644 bittorrent.desktop %{buildroot}% 
{_datadir}/gnome/apps/Internet/bittorrent.desktop
%else
@@ -94,13 +102,16 @@
                 bittorrent.desktop
%endif
+%if %{!?_without_gui:1}0
%{__install} -Dp -m644 images/logo/bittorrent_96.png %{buildroot}% 
{_datadir}/pixmaps/bittorrent.png
+%endif
%post gui
update-desktop-database %{_datadir}/applications &>/dev/null || :
%postun gui
update-desktop-database %{_datadir}/applications &>/dev/null || :
+%endif
%clean
%{__rm} -rf %{buildroot}
@@ -114,12 +125,14 @@
%{_datadir}/pixmaps/BitTorrent-%{version}/
%exclude %{_docdir}/BitTorrent-%{version}/
+%if %{!?_without_gui:1}0
%files gui
%defattr(-, root, root, 0755)
%{_bindir}/bittorrent
%{_datadir}/pixmaps/bittorrent.png
%{!?_without_freedesktop:%{_datadir}/applications/%{desktop_vendor}- 
bittorrent.desktop}
%{?_without_freedesktop:%{_datadir}/gnome/apps/Internet/ 
bittorrent.desktop}
+%endif
%files -n python-khashmir
%defattr(-, root, root, 0755)


  > rpm -ql bittorrent
/usr/bin/bittorrent-console
/usr/bin/bittorrent-curses
/usr/bin/bittorrent-tracker
/usr/bin/changetracker-console
/usr/bin/launchmany-console
/usr/bin/launchmany-curses
/usr/bin/maketorrent
/usr/bin/maketorrent-console
/usr/bin/torrentinfo-console
/usr/lib/python2.2/site-packages/BitTorrent
/usr/lib/python2.2/site-packages/BitTorrent/Choker.py
/usr/lib/python2.2/site-packages/BitTorrent/Choker.pyc
/usr/lib/python2.2/site-packages/BitTorrent/ClientIdentifier.py
/usr/lib/python2.2/site-packages/BitTorrent/ClientIdentifier.pyc
/usr/lib/python2.2/site-packages/BitTorrent/Connecter.py
/usr/lib/python2.2/site-packages/BitTorrent/Connecter.pyc
/usr/lib/python2.2/site-packages/BitTorrent/ConvertedMetainfo.py
/usr/lib/python2.2/site-packages/BitTorrent/ConvertedMetainfo.pyc
/usr/lib/python2.2/site-packages/BitTorrent/CurrentRateMeasure.py
/usr/lib/python2.2/site-packages/BitTorrent/CurrentRateMeasure.pyc
/usr/lib/python2.2/site-packages/BitTorrent/Desktop.py
/usr/lib/python2.2/site-packages/BitTorrent/Desktop.pyc
/usr/lib/python2.2/site-packages/BitTorrent/Downloader.py
/usr/lib/python2.2/site-packages/BitTorrent/Downloader.pyc
/usr/lib/python2.2/site-packages/BitTorrent/DownloaderFeedback.py
/usr/lib/python2.2/site-packages/BitTorrent/DownloaderFeedback.pyc
/usr/lib/python2.2/site-packages/BitTorrent/Encoder.py
/usr/lib/python2.2/site-packages/BitTorrent/Encoder.pyc
/usr/lib/python2.2/site-packages/BitTorrent/GUI.py
/usr/lib/python2.2/site-packages/BitTorrent/GUI.pyc
/usr/lib/python2.2/site-packages/BitTorrent/GetTorrent.py
/usr/lib/python2.2/site-packages/BitTorrent/GetTorrent.pyc
/usr/lib/python2.2/site-packages/BitTorrent/HTTPHandler.py
/usr/lib/python2.2/site-packages/BitTorrent/HTTPHandler.pyc
/usr/lib/python2.2/site-packages/BitTorrent/LaunchPath.py
/usr/lib/python2.2/site-packages/BitTorrent/LaunchPath.pyc
/usr/lib/python2.2/site-packages/BitTorrent/NatCheck.py
/usr/lib/python2.2/site-packages/BitTorrent/NatCheck.pyc
/usr/lib/python2.2/site-packages/BitTorrent/NewVersion.py
/usr/lib/python2.2/site-packages/BitTorrent/NewVersion.pyc
/usr/lib/python2.2/site-packages/BitTorrent/PiecePicker.py
/usr/lib/python2.2/site-packages/BitTorrent/PiecePicker.pyc
/usr/lib/python2.2/site-packages/BitTorrent/RateLimiter.py
/usr/lib/python2.2/site-packages/BitTorrent/RateLimiter.pyc
/usr/lib/python2.2/site-packages/BitTorrent/RateMeasure.py
/usr/lib/python2.2/site-packages/BitTorrent/RateMeasure.pyc
/usr/lib/python2.2/site-packages/BitTorrent/RawServer.py
/usr/lib/python2.2/site-packages/BitTorrent/RawServer.pyc
/usr/lib/python2.2/site-packages/BitTorrent/RawServer_magic.py
/usr/lib/python2.2/site-packages/BitTorrent/RawServer_magic.pyc
/usr/lib/python2.2/site-packages/BitTorrent/RawServer_twisted.py
/usr/lib/python2.2/site-packages/BitTorrent/RawServer_twisted.pyc
/usr/lib/python2.2/site-packages/BitTorrent/Rerequester.py
/usr/lib/python2.2/site-packages/BitTorrent/Rerequester.pyc
/usr/lib/python2.2/site-packages/BitTorrent/Storage.py
/usr/lib/python2.2/site-packages/BitTorrent/Storage.pyc
/usr/lib/python2.2/site-packages/BitTorrent/StorageWrapper.py
/usr/lib/python2.2/site-packages/BitTorrent/StorageWrapper.pyc
/usr/lib/python2.2/site-packages/BitTorrent/TorrentQueue.py
/usr/lib/python2.2/site-packages/BitTorrent/TorrentQueue.pyc
/usr/lib/python2.2/site-packages/BitTorrent/Uploader.py
/usr/lib/python2.2/site-packages/BitTorrent/Uploader.pyc
/usr/lib/python2.2/site-packages/BitTorrent/__init__.py
/usr/lib/python2.2/site-packages/BitTorrent/__init__.pyc
/usr/lib/python2.2/site-packages/BitTorrent/bencode.py
/usr/lib/python2.2/site-packages/BitTorrent/bencode.pyc
/usr/lib/python2.2/site-packages/BitTorrent/bitfield.py
/usr/lib/python2.2/site-packages/BitTorrent/bitfield.pyc
/usr/lib/python2.2/site-packages/BitTorrent/btformats.py
/usr/lib/python2.2/site-packages/BitTorrent/btformats.pyc
/usr/lib/python2.2/site-packages/BitTorrent/configfile.py
/usr/lib/python2.2/site-packages/BitTorrent/configfile.pyc
/usr/lib/python2.2/site-packages/BitTorrent/controlsocket.py
/usr/lib/python2.2/site-packages/BitTorrent/controlsocket.pyc
/usr/lib/python2.2/site-packages/BitTorrent/defaultargs.py
/usr/lib/python2.2/site-packages/BitTorrent/defaultargs.pyc
/usr/lib/python2.2/site-packages/BitTorrent/defer.py
/usr/lib/python2.2/site-packages/BitTorrent/defer.pyc
/usr/lib/python2.2/site-packages/BitTorrent/download.py
/usr/lib/python2.2/site-packages/BitTorrent/download.pyc
/usr/lib/python2.2/site-packages/BitTorrent/launchmanycore.py
/usr/lib/python2.2/site-packages/BitTorrent/launchmanycore.pyc
/usr/lib/python2.2/site-packages/BitTorrent/makemetafile.py
/usr/lib/python2.2/site-packages/BitTorrent/makemetafile.pyc
/usr/lib/python2.2/site-packages/BitTorrent/obsoletepythonsupport.py
/usr/lib/python2.2/site-packages/BitTorrent/obsoletepythonsupport.pyc
/usr/lib/python2.2/site-packages/BitTorrent/parseargs.py
/usr/lib/python2.2/site-packages/BitTorrent/parseargs.pyc
/usr/lib/python2.2/site-packages/BitTorrent/parsedir.py
/usr/lib/python2.2/site-packages/BitTorrent/parsedir.pyc
/usr/lib/python2.2/site-packages/BitTorrent/platform.py
/usr/lib/python2.2/site-packages/BitTorrent/platform.pyc
/usr/lib/python2.2/site-packages/BitTorrent/prefs.py
/usr/lib/python2.2/site-packages/BitTorrent/prefs.pyc
/usr/lib/python2.2/site-packages/BitTorrent/selectpoll.py
/usr/lib/python2.2/site-packages/BitTorrent/selectpoll.pyc
/usr/lib/python2.2/site-packages/BitTorrent/track.py
/usr/lib/python2.2/site-packages/BitTorrent/track.pyc
/usr/lib/python2.2/site-packages/BitTorrent/zurllib.py
/usr/lib/python2.2/site-packages/BitTorrent/zurllib.pyc
/usr/share/doc/bittorrent-4.2.2
/usr/share/doc/bittorrent-4.2.2/BUILD.windows.txt
/usr/share/doc/bittorrent-4.2.2/INSTALL.unix.txt
/usr/share/doc/bittorrent-4.2.2/LICENSE.txt
/usr/share/doc/bittorrent-4.2.2/README.txt
/usr/share/doc/bittorrent-4.2.2/TRACKERLESS.txt
/usr/share/doc/bittorrent-4.2.2/credits-l10n.txt
/usr/share/doc/bittorrent-4.2.2/credits.txt
/usr/share/doc/bittorrent-4.2.2/redirdonate.html
/usr/share/locale/af/LC_MESSAGES/bittorrent.mo
/usr/share/locale/bg/LC_MESSAGES/bittorrent.mo
/usr/share/locale/ca/LC_MESSAGES/bittorrent.mo
/usr/share/locale/cs/LC_MESSAGES/bittorrent.mo
/usr/share/locale/da/LC_MESSAGES/bittorrent.mo
/usr/share/locale/de/LC_MESSAGES/bittorrent.mo
/usr/share/locale/es/LC_MESSAGES/bittorrent.mo
/usr/share/locale/es_MX/LC_MESSAGES/bittorrent.mo
/usr/share/locale/fr/LC_MESSAGES/bittorrent.mo
/usr/share/locale/gr/LC_MESSAGES/bittorrent.mo
/usr/share/locale/hu/LC_MESSAGES/bittorrent.mo
/usr/share/locale/it/LC_MESSAGES/bittorrent.mo
/usr/share/locale/ja/LC_MESSAGES/bittorrent.mo
/usr/share/locale/ko/LC_MESSAGES/bittorrent.mo
/usr/share/locale/nb_NO/LC_MESSAGES/bittorrent.mo
/usr/share/locale/nl/LC_MESSAGES/bittorrent.mo
/usr/share/locale/pl/LC_MESSAGES/bittorrent.mo
/usr/share/locale/pt/LC_MESSAGES/bittorrent.mo
/usr/share/locale/pt_BR/LC_MESSAGES/bittorrent.mo
/usr/share/locale/ro/LC_MESSAGES/bittorrent.mo
/usr/share/locale/ru/LC_MESSAGES/bittorrent.mo
/usr/share/locale/sk/LC_MESSAGES/bittorrent.mo
/usr/share/locale/sl/LC_MESSAGES/bittorrent.mo
/usr/share/locale/sv/LC_MESSAGES/bittorrent.mo
/usr/share/locale/tr/LC_MESSAGES/bittorrent.mo
/usr/share/locale/vi/LC_MESSAGES/bittorrent.mo
/usr/share/locale/zh_CN/LC_MESSAGES/bittorrent.mo
/usr/share/locale/zh_TW/LC_MESSAGES/bittorrent.mo
/usr/share/pixmaps/BitTorrent-4.2.2
/usr/share/pixmaps/BitTorrent-4.2.2/bittorrent.ico
/usr/share/pixmaps/BitTorrent-4.2.2/broken.png
/usr/share/pixmaps/BitTorrent-4.2.2/finished.png
/usr/share/pixmaps/BitTorrent-4.2.2/info.png
/usr/share/pixmaps/BitTorrent-4.2.2/logo
/usr/share/pixmaps/BitTorrent-4.2.2/logo/bittorrent_32.png
/usr/share/pixmaps/BitTorrent-4.2.2/logo/bittorrent_96.png
/usr/share/pixmaps/BitTorrent-4.2.2/pause.png
/usr/share/pixmaps/BitTorrent-4.2.2/paused.png
/usr/share/pixmaps/BitTorrent-4.2.2/play.png
/usr/share/pixmaps/BitTorrent-4.2.2/queued.png
/usr/share/pixmaps/BitTorrent-4.2.2/remove.png
/usr/share/pixmaps/BitTorrent-4.2.2/running.png
/usr/share/pixmaps/BitTorrent-4.2.2/status-natted.png
/usr/share/pixmaps/BitTorrent-4.2.2/status-running.png
/usr/share/pixmaps/BitTorrent-4.2.2/status-stopped.png
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.