1 |
# Copyright 1999-2014 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/youtube-dl/youtube-dl-2014.10.18.ebuild,v 1.1 2014/10/19 08:08:53 jer Exp $ |
4 |
|
5 |
EAPI=5 |
6 |
|
7 |
PYTHON_COMPAT=(python{2_6,2_7,3_3,3_4}) |
8 |
DISTUTILS_SINGLE_IMPL=true |
9 |
inherit bash-completion-r1 distutils-r1 eutils |
10 |
|
11 |
DESCRIPTION="Download videos from YouTube.com (and more sites...)" |
12 |
HOMEPAGE="http://rg3.github.com/youtube-dl/" |
13 |
SRC_URI="http://youtube-dl.org/downloads/${PV}/${P}.tar.gz" |
14 |
|
15 |
LICENSE="public-domain" |
16 |
SLOT="0" |
17 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris" |
18 |
IUSE="offensive test" |
19 |
|
20 |
DEPEND=" |
21 |
dev-python/setuptools[${PYTHON_USEDEP}] |
22 |
test? ( dev-python/nose[coverage(+)] ) |
23 |
" |
24 |
|
25 |
S="${WORKDIR}/${PN}" |
26 |
|
27 |
src_prepare() { |
28 |
if ! use offensive; then |
29 |
sed -i -e "/__version__/s|'$|-gentoo_no_offensive_sites'|g" \ |
30 |
youtube_dl/version.py || die |
31 |
local xxx=( |
32 |
anysex behindkink drtuber eporner extremetube fourtube goshgay |
33 |
hentaistigma hornbunny mofosex pornhd pornhub pornotube pornoxo |
34 |
redtube sexykarma sunporno slutload spankwire thisav trutube tube8 |
35 |
vporn xbef xhamster xnxx xtube xvideos youjizz youporn |
36 |
) |
37 |
sed -i -e $( printf '/%s/d;' ${xxx[@]} ) youtube_dl/extractor/__init__.py || die |
38 |
rm $( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \ |
39 |
test/test_age_restriction.py || die |
40 |
fi |
41 |
} |
42 |
|
43 |
src_compile() { |
44 |
distutils-r1_src_compile |
45 |
} |
46 |
|
47 |
src_test() { |
48 |
emake test |
49 |
} |
50 |
|
51 |
src_install() { |
52 |
python_domodule youtube_dl |
53 |
dobin bin/${PN} |
54 |
dodoc README.txt |
55 |
doman ${PN}.1 |
56 |
newbashcomp ${PN}.bash-completion ${PN} |
57 |
python_fix_shebang "${ED}" |
58 |
} |