Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 68c3270f18dbbc41ab8092a085d6d3c7 > files > 9

bittorrent-3.3-4mdk.src.rpm

Summary: BitTorrent is a tool for copying files from one machine to another
Name: bittorrent
Version: 3.3
Release: 4mdk
Source0: http://bitconjurer.org/BitTorrent/BitTorrent-%{version}.tar.bz2
Source1: %{name}-16.png
Source2: %{name}-32.png
Source3: %{name}-48.png
Source4: BitTorrent-3.3-man.tar.bz2
Patch: BitTorrent-3.3-nonag.patch.bz2
Patch1: BitTorrent-3.3-maketorrent-1.2.patch.bz2
Patch2: BitTorrent-3.3-file-open.patch.bz2
License: MIT
Group: Networking/File transfer
URL: http://bitconjurer.org/BitTorrent/
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildArchitectures: noarch
BuildRequires: python-devel

%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: wxPythonGTK
Requires: %name = %version-%release
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 -b .nonag
%patch1 -p1 -b .maketorrent
%patch2 -p1 -b .file-open

%build
python ./setup.py build

%install
rm -rf $RPM_BUILD_ROOT
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="btdownloadgui.py" 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="btcompletedirgui.py" 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

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README.txt credits.txt LICENSE.txt
%_bindir/btcompletedir.py
%_bindir/btdownloadcurses.py
%_bindir/btdownloadheadless.py
%_bindir/btdownloadlibrary.py
%_bindir/btlaunchmany.py
%_bindir/btlaunchmanycurses.py
%_bindir/btmakemetafile.py
%_bindir/btreannounce.py
%_bindir/btrename.py
%_bindir/btshowmetainfo.py
%_bindir/bttest.py
%_bindir/bttrack.py
%_libdir/python*/site-packages/BitTorrent
%_mandir/man1/bittorrent-downloader.1*
%_mandir/man1/bittorrent-multi-downloader.1*
%_mandir/man1/btmakemetafile.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/btcompletedirgui.py
%_bindir/btdownloadgui.py
%_menudir/*
%_datadir/mime-info/*
%_iconsdir/%{name}.png
%_miconsdir/%{name}.png
%_liconsdir/%{name}.png
%_mandir/man1/btdownloadgui.1*

%post gui
%{update_menus}

%postun gui
%{clean_menus}


%changelog
* 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