| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-p2p/tribler/tribler-5.9.30.ebuild,v 1.1 2012/09/13 00:05:20 blueness Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
PYTHON_DEPEND="2" |
| 7 |
PYTHON_USE_WITH="sqlite" |
| 8 |
|
| 9 |
inherit eutils python |
| 10 |
|
| 11 |
MY_PV="${PN}_${PV}_all" |
| 12 |
|
| 13 |
DESCRIPTION="Bittorrent client that does not require a website to discover content" |
| 14 |
HOMEPAGE="http://www.tribler.org/" |
| 15 |
SRC_URI=" |
| 16 |
http://dl.tribler.org/${MY_PV}.deb |
| 17 |
x86? ( http://dl.tribler.org/tribler-swift_6.0.0-28795_i386.deb ) |
| 18 |
amd64? ( http://dl.tribler.org/tribler-swift_6.0.0-28795_amd64.deb )" |
| 19 |
|
| 20 |
LICENSE="LGPL-2.1" |
| 21 |
SLOT="0" |
| 22 |
KEYWORDS="~amd64 ~x86" |
| 23 |
IUSE="vlc" |
| 24 |
|
| 25 |
RDEPEND=" |
| 26 |
dev-python/apsw |
| 27 |
dev-python/m2crypto |
| 28 |
dev-python/netifaces |
| 29 |
dev-libs/openssl |
| 30 |
dev-python/wxpython |
| 31 |
vlc? ( |
| 32 |
media-video/vlc |
| 33 |
media-video/ffmpeg |
| 34 |
)" |
| 35 |
|
| 36 |
DEPEND="${RDEPEND} |
| 37 |
app-arch/unzip" |
| 38 |
|
| 39 |
S="${WORKDIR}" |
| 40 |
|
| 41 |
QA_PREBUILT="/usr/share/tribler/swift" |
| 42 |
|
| 43 |
pkg_setup() { |
| 44 |
python_set_active_version 2 |
| 45 |
python_pkg_setup |
| 46 |
} |
| 47 |
|
| 48 |
src_unpack() { |
| 49 |
for i in ${A}; do |
| 50 |
unpack ${i} |
| 51 |
unpack ./data.tar.gz |
| 52 |
done |
| 53 |
} |
| 54 |
|
| 55 |
src_prepare() { |
| 56 |
epatch "${FILESDIR}/${PN}-5.9.12-fix-global-declarations.patch" |
| 57 |
epatch "${FILESDIR}/${PN}-log2homedir.patch" |
| 58 |
|
| 59 |
python_convert_shebangs -r 2 . |
| 60 |
} |
| 61 |
|
| 62 |
src_compile() { :; } |
| 63 |
|
| 64 |
src_install() { |
| 65 |
#Rename the doc dir properly |
| 66 |
mv usr/share/doc/${PN} usr/share/doc/${P} |
| 67 |
|
| 68 |
#Move the readme to the doc dir |
| 69 |
mv usr/share/${PN}/Tribler/readme.txt usr/share/doc/${P} |
| 70 |
|
| 71 |
#Remove the licenses scattered throughout |
| 72 |
rm usr/share/doc/${P}/copyright |
| 73 |
rm usr/share/${PN}/Tribler/*.txt |
| 74 |
rm usr/share/${PN}/Tribler/Core/DecentralizedTracking/pymdht/{LGPL-2.1.txt,LICENSE.txt} |
| 75 |
|
| 76 |
#Copy the rest over |
| 77 |
cp -pPR usr/ "${ED}"/ |
| 78 |
} |
| 79 |
|
| 80 |
pkg_postinst() { |
| 81 |
python_mod_optimize "${ROOT}"usr/share/${PN} |
| 82 |
} |
| 83 |
|
| 84 |
pkg_postrm() { |
| 85 |
python_mod_cleanup "${ROOT}"usr/share/${PN} |
| 86 |
} |