/[gentoo-x86]/net-p2p/bittornado/bittornado-0.0.1.ebuild
Gentoo

Contents of /net-p2p/bittornado/bittornado-0.0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Mar 18 17:54:45 2004 UTC (15 years, 7 months ago) by eradicator
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fixed sed line in src_unpack.  Thanks to Ryan Skadberg <skadz@stigmata.org> in bug #45036.

1 # Copyright 1999-2004 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/net-p2p/bittornado/bittornado-0.0.1.ebuild,v 1.1 2004/03/18 06:15:14 eradicator Exp $
4
5 inherit distutils
6 inherit eutils
7
8 MY_PN="BitTornado"
9 MY_P="${MY_PN}-${PV}"
10
11 DESCRIPTION="TheShad0w's experimental BitTorrent client"
12 HOMEPAGE="http://bt.degreez.net/"
13 SRC_URI="http://dl9.degreez.net/${MY_P}.tar.gz"
14 LICENSE="MIT"
15 SLOT="0"
16
17 KEYWORDS="~x86 ~amd64"
18 IUSE="X"
19
20 RDEPEND="X? ( >=dev-python/wxPython-2.2 )
21 >=dev-lang/python-2.0
22 !virtual/bittorrent"
23
24 DEPEND="${RDEPEND}
25 >=sys-apps/sed-4.0.5"
26
27 PROVIDE="virtual/bittorrent"
28
29 S="${WORKDIR}/${MY_PN}-CVS"
30 PIXMAPLOC="/usr/share/pixmaps/bittorrent"
31
32 src_unpack() {
33 unpack ${A}
34 sed -i "s:os.path.abspath(os.path.dirname(sys.argv\[0\])):\"${PIXMAPLOC}/\":" ${S}/btdownloadgui.py || die "sed failure 1"
35 sed -i "s:BitTorrent\.version:BitTornado.version:g" ${S}/setup.py || die "sed failure 2"
36 sed -i 's:packages = ["BitTornado"],:packages = ["BitTornado","BitTornado.BT1"]:g' ${S}/setup.py || die "sed failure 3"
37 }
38
39 src_install() {
40 distutils_src_install
41
42 dodir etc
43 cp -a /etc/mailcap ${D}/etc/
44 MAILCAP_STRING="application/x-bittorrent; /usr/bin/btdownloadgui.py '%s'; test=test -n \"\$DISPLAY\""
45
46 if use X; then
47 dodir ${PIXMAPLOC}
48 insinto ${PIXMAPLOC}
49 doins *.ico *.gif
50 if [ -n "`grep 'application/x-bittorrent' ${D}/etc/mailcap`" ]; then
51 # replace bittorrent entry if it already exists
52 einfo "updating bittorrent mime info"
53 sed -i "s,application/x-bittorrent;.*,${MAILCAP_STRING}," ${D}/etc/mailcap
54 else
55 # add bittorrent entry if it doesn't exist
56 einfo "adding bittorrent mime info"
57 echo "${MAILCAP_STRING}" >> ${D}/etc/mailcap
58 fi
59 else
60 # get rid of any reference to the not-installed gui version
61 sed -i '/btdownloadgui/d' ${D}/etc/mailcap
62 rm ${D}/usr/bin/*gui.py
63 fi
64 }

  ViewVC Help
Powered by ViewVC 1.1.20