/[gentoo-x86]/net-misc/plowshare/plowshare-20120609-r1.ebuild
Gentoo

Contents of /net-misc/plowshare/plowshare-20120609-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Aug 17 16:51:21 2012 UTC (7 years, 3 months ago) by kensington
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.1.11.10/cvs/Linux x86_64)

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-misc/plowshare/plowshare-20120609-r1.ebuild,v 1.1 2012/06/22 06:40:02 xmw Exp $
4
5 EAPI="2"
6
7 inherit bash-completion-r1
8
9 MY_P="${PN}-snapshot-git${PV}"
10
11 DESCRIPTION="Command-line downloader and uploader for file-sharing websites"
12 HOMEPAGE="http://code.google.com/p/plowshare/"
13 SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz"
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="~amd64 ~arm ~ppc ~x86"
18 IUSE="bash-completion +javascript +perl scripts view-captcha"
19
20 RDEPEND="
21 javascript? ( dev-lang/spidermonkey )
22 perl? ( dev-lang/perl
23 media-gfx/imagemagick[perl] )
24 view-captcha? ( || ( media-gfx/aview media-libs/libcaca ) )
25 app-shells/bash
26 || ( app-text/recode ( dev-lang/perl dev-perl/HTML-Parser ) )
27 app-text/tesseract[tiff]
28 || ( media-gfx/imagemagick[tiff] media-gfx/graphicsmagick[imagemagick,tiff] )
29 net-misc/curl
30 sys-apps/util-linux"
31 DEPEND=""
32
33 S=${WORKDIR}/${MY_P}
34
35 # NOTES:
36 # spidermonkey dep should be any javascript interpreter using /usr/bin/js
37
38 # TODO:
39 # dev-java/rhino could probably be an alternative for spidermonkey
40
41 src_prepare() {
42 if ! use javascript; then
43 sed -i -e 's:^mediafire.*::' \
44 -e 's:^badongo.*::' \
45 -e 's:^dataport_cz.*::' \
46 -e 's:^1fichier.*::' \
47 src/modules/config || die "sed failed"
48 rm src/modules/{mediafire,badongo,dataport_cz,1fichier}.sh || die "rm failed"
49 fi
50 if ! use perl; then
51 sed -i -e 's:^netload_in.*::' \
52 -e 's:^badongo.*::' \
53 src/modules/config || die "sed failed"
54 rm src/modules/netload_in.sh || die "rm failed"
55 if use javascript; then
56 rm src/modules/badongo.sh || die "rm failed"
57 fi
58
59 # Don't install perl file helpers.
60 sed -i -e 's:\(.*src/core.sh\).*:\1:' Makefile || die "sed failed"
61 fi
62
63 # Don't let 'make install' install docs.
64 sed -i -e "/INSTALL.*DOCDIR/d" Makefile || die "sed failed"
65
66 if use bash-completion; then
67 sed -i -e \
68 's:CDIR=/usr/local/share/plowshare/modules/config:CDIR=/usr/share/plowshare/modules/config:' \
69 etc/plowshare.completion || die "sed failed"
70 fi
71 }
72
73 src_compile() {
74 # There is a Makefile but it's not compiling anything, let's not try.
75 :
76 }
77
78 src_test() {
79 # Disable tests because all of them need a working Internet connection.
80 :
81 }
82
83 src_install() {
84 DESTDIR="${D}" PREFIX="/usr" emake install || die "emake install failed"
85
86 dodoc AUTHORS CHANGELOG README || die "dodoc failed"
87
88 if use scripts; then
89 exeinto /usr/bin/
90 doexe contrib/{caturl,plowdown_{add_remote_loop,loop,parallel}}.sh \
91 || die "doins failed"
92 fi
93
94 if use bash-completion; then
95 newbashcomp etc/${PN}.completion ${PN} || die "newbashcomp failed"
96 fi
97 }
98
99 pkg_postinst() {
100 if ! use javascript; then
101 ewarn "Without javascript you will not be able to use:"
102 ewarn " mediafire, badongo, dataport_cz and 1fichier."
103 fi
104 if ! use perl; then
105 ewarn "Without perl you will not be able to use:"
106 ewarn " netload.in and badongo."
107 fi
108 }

  ViewVC Help
Powered by ViewVC 1.1.20