%define rel 5 %define release %mkrel %rel #fixed2 %{?!mkrel:%define mkrel(c:) %{-c: 0.%{-c*}.}%{!?_with_unstable:%(perl -e '$_="%{1}";m/(.\*\\D\+)?(\\d+)$/;$rel=${2}-1;re;print "$1$rel";').%{?subrel:%subrel}%{!?subrel:1}.%{?distversion:%distversion}%{?!distversion:%(echo $[%{mdkversion}/10])}}%{?_with_unstable:%{1}}%{?distsuffix:%distsuffix}%{?!distsuffix:mdk}} Summary: BitTorrent is a tool for copying files from one machine to another Name: bittorrent Version: 4.1.4 Release: %release Source0: http://www.bittorrent.com/dl/BitTorrent-%{version}.tar.bz2 Source1: %{name}-16.png Source2: %{name}-32.png Source3: %{name}-48.png Source4: BitTorrent-3.3-man.tar.bz2 Source5: bittorrent-bash-completion-20050712.bz2 #gw Crypto is only needed on win32 Patch: bittorrent-4.1.4-no-pycrypto.patch.bz2 Patch5: BitTorrent-4.1.4-paths.patch.bz2 License: BitTorrent Open Source License Group: Networking/File transfer URL: http://bittorrent.com/ BuildRoot: %{_tmppath}/%{name}-buildroot #gw ok, this is noarch, but the upload system breaks all python noarch # packages by rebuilding them on x86_64, so python modules end up in # /usr/lib64 which doesn't exist on x86. #BuildArchitectures: noarch BuildRequires: python-devel Requires: python %description BitTorrent is a tool for copying files from one machine to another. FTP punishes sites for being popular. Since all uploading is done from one place, a popular site needs big iron and big 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 tools Group: Networking/File transfer Requires: pygtk2.0 Requires: %name = %version Conflicts: kdelibs-common <= 3.1.3 %description gui BitTorrent is a tool for copying files from one machine to another. FTP punishes sites for being popular. Since all uploading is done from one place, a popular site needs big iron and big bandwidth. With BitTorrent, clients automatically mirror files they download, making the publisher's burden almost nothing. This package contains the graphical versions of the BitTorrent tools. %prep %setup -q -n BitTorrent-%version -a 4 %patch -p1 %patch5 -p1 -b .paths %build python ./setup.py build %install rm -rf $RPM_BUILD_ROOT %name.lang python ./setup.py install --root=$RPM_BUILD_ROOT perl -p -i -e 's/env python2/env python/' $RPM_BUILD_ROOT%_bindir/* install -d %buildroot%_mandir cp -r man1 %buildroot%_mandir install -m 644 -D %{SOURCE1} ${RPM_BUILD_ROOT}%{_miconsdir}/%{name}.png install -m 644 -D %{SOURCE2} ${RPM_BUILD_ROOT}%{_iconsdir}/%{name}.png install -m 644 -D %{SOURCE3} ${RPM_BUILD_ROOT}%{_liconsdir}/%{name}.png mkdir -p $RPM_BUILD_ROOT%{_menudir} cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name}-gui ?package(bittorrent-gui): needs="x11" section="Networking/File Transfer" command="bittorrent" mimetypes="application/x-bittorrent" accept_url="false" multiple_files="true" title="BitTorrent GUI" longtitle="Download files with BitTorrent" icon="%name.png" ?package(bittorrent-gui): needs="x11" section="Networking/File Transfer" command="maketorrent" title="BitTorrent creator" longtitle="Creates BitTorrent metadata files" icon="%name.png" EOF mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime-info cat << EOF > $RPM_BUILD_ROOT%{_datadir}/mime-info/BitTorrent\ GUI.mime application/x-bittorrent ext: torrent EOF mkdir -p %buildroot%_sysconfdir/bash_completion.d bzcat %SOURCE5 > %buildroot%_sysconfdir/bash_completion.d/bittorrent %find_lang %name %clean rm -rf $RPM_BUILD_ROOT %files -f %name.lang %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/bash_completion.d/* %doc %_datadir/doc/%name-%version %_bindir/bittorrent-curses %_bindir/bittorrent-console %_bindir/maketorrent-console %_bindir/launchmany-curses %_bindir/launchmany-console %_bindir/changetracker-console %_bindir/torrentinfo-console %_bindir/bittorrent-tracker %_libdir/python*/site-packages/BitTorrent %_libdir/python*/site-packages/khashmir %_mandir/man1/bittorrent-downloader.1* %_mandir/man1/bittorrent-multi-downloader.1* %_mandir/man1/btreannounce.1* %_mandir/man1/btrename.1* %_mandir/man1/btshowmetainfo.1* %_mandir/man1/bttrack.1* %_mandir/man1/btdownloadcurses.1* %_mandir/man1/btdownloadheadless.1* %_mandir/man1/btdownloadprefetched.1* %_mandir/man1/btlaunchmany.1* %_mandir/man1/btlaunchmanycurses.1* %files gui %defattr(-,root,root) %doc README.txt %_bindir/bittorrent %_bindir/maketorrent %_menudir/* %_datadir/mime-info/* %_iconsdir/%{name}.png %_miconsdir/%{name}.png %_liconsdir/%{name}.png %_mandir/man1/btdownloadgui.1* %_datadir/pixmaps/BitTorrent-%version/* %post gui %{update_menus} %postun gui %{clean_menus} %changelog * Sat Aug 27 2005 Götz Waschk <waschk@mandriva.org> 4.1.4-5mdk - rebuild * Fri Aug 26 2005 Götz Waschk <waschk@mandriva.org> 4.1.4-4mdk - annoy the x86_64 maintainers back * Fri Aug 26 2005 Götz Waschk <waschk@mandriva.org> 4.1.4-3mdk - rebuild to replace lib64 by lib * Thu Aug 25 2005 Götz Waschk <waschk@mandriva.org> 4.1.4-2mdk - remove pycrypto dependancy * Wed Aug 24 2005 Götz Waschk <waschk@mandriva.org> 4.1.4-1mdk - update source 5 - update file list - update the patch - New release 4.1.4 * Mon Jul 18 2005 Götz Waschk <waschk@mandriva.org> 4.1.3-1mdk - New release 4.1.3 * Wed Jul 13 2005 Götz Waschk <waschk@mandriva.org> 4.1.2-2mdk - add Guillaume's bash-completion for bittorrent * Fri Jun 10 2005 Götz Waschk <waschk@mandriva.org> 4.1.2-1mdk - rediff the patch - New release 4.1.2 * Wed May 25 2005 Götz Waschk <waschk@mandriva.org> 4.1.1-3mdk - add translations (only french for now) - New release 4.1.1 * Thu May 19 2005 Götz Waschk <waschk@mandriva.org> 4.1.0-3mdk - fix mkrel * Thu May 19 2005 Götz Waschk <waschk@mandriva.org> 4.1.0-2mdk - mkrel * Thu May 19 2005 Götz Waschk <waschk@mandriva.org> 4.1.0-1mdk - update file list - New release 4.1.0 * Sat Apr 2 2005 Daouda LO <daouda@mandrakesoft.com> 4.0.1-1mdk - new version - tested with drakbt (#14500) - 4.0.0 bugfixes: o fix mouse and keyboard freezes when downloading files o fix settings/preferences not saved when quiting o fix bug on reading metainfo * Tue Mar 8 2005 Götz Waschk <waschk@linux-mandrake.com> 4.0.0-1mdk - new version * Wed Feb 16 2005 Götz Waschk <waschk@linux-mandrake.com> 3.9.1-2mdk - fix deps * Sun Jan 23 2005 Goetz Waschk <waschk@linux-mandrake.com> 3.9.1-1mdk - New release 3.9.1 * Tue Dec 28 2004 Götz Waschk <waschk@linux-mandrake.com> 3.9.0-2mdk - fix patch 5 * Tue Dec 21 2004 Götz Waschk <waschk@linux-mandrake.com> 3.9.0-1mdk - drop patches 1,2,3,4 don't apply anymore - drop patch 0, must be updated! - change license - fix URL - New release 3.9.0 * Sat Dec 04 2004 Michael Scherer <misc@mandrake.org> 3.4.2-7mdk - Rebuild for new python * Wed Sep 22 2004 Götz Waschk <waschk@linux-mandrake.com> 3.4.2-6mdk - make help appear in a friendly dialog (bug #8809) * Sun Aug 15 2004 Götz Waschk <waschk@linux-mandrake.com> 3.4.2-5mdk - fix deps * Fri Aug 13 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 3.4.2-4mdk - Rebuild for new menu * Wed Jul 7 2004 Götz Waschk <waschk@linux-mandrake.com> 3.4.2-3mdk - update patch 3 for btcompletedirgui.py * Wed Jul 7 2004 Götz Waschk <waschk@linux-mandrake.com> 3.4.2-2mdk - patch for new wxPythonGTK (J.A. Magallon), please test * Mon Apr 5 2004 Götz Waschk <waschk@linux-mandrake.com> 3.4.2-1mdk - rediff patch 1 - new version * Fri Apr 2 2004 Götz Waschk <waschk@linux-mandrake.com> 3.4.1a-1mdk - rediff patch 1 - new version * Sun Feb 22 2004 Götz Waschk <waschk@linux-mandrake.com> 3.3-4mdk - btdownloadgui.py: open file dialog on startup * Wed Nov 5 2003 Götz Waschk <waschk@linux-mandrake.com> 3.3-3mdk - fix conflict with new KDE * Tue Nov 4 2003 Götz Waschk <waschk@linux-mandrake.com> 3.3-2mdk - remove broken donation nag message - use transparent icons without text - include debian man pages - add icons from Maxim Heijndijk <cchq@wanadoo.nl> - adapt patch 1 - remove missing docs from the list - drop patch 0 (merged) - new version - fix menu entry - patch in maketorrent fixes - sync fixes from debian release 5 * Fri Sep 05 2003 Frederic Crozat <fcrozat@mandrakesoft.com> 3.2.1b-6mdk - Add menu entry * Thu Aug 07 2003 Frederic Lepied <flepied@mandrakesoft.com> 3.2.1b-5mdk - python 2.3 * Thu Jul 24 2003 Götz Waschk <waschk@linux-mandrake.com> 3.2.1b-4mdk - patch from debian (close files, mass downloaders, error messages) * Thu Apr 24 2003 Götz Waschk <waschk@linux-mandrake.com> 3.2.1b-3mdk - use the _prefix macro in the install call - remove prefix tag (Frederic Crozat) * Thu Apr 24 2003 Götz Waschk <waschk@linux-mandrake.com> 3.2.1b-2mdk - fix buildrequires * Sun Mar 30 2003 Götz Waschk <waschk@linux-mandrake.com> 3.2.1b-1mdk - split out gui tools to remove wxPythonGTK dep from the main package - new version * Fri Mar 28 2003 Frederic Lepied <flepied@mandrakesoft.com> 3.2-1mdk - 3.2 * Wed Mar 26 2003 Frederic Lepied <flepied@mandrakesoft.com> 3.1-1mdk - initial packaging # end of file