/[gentoo-x86]/app-portage/pfl/pfl-2.3.ebuild
Gentoo

Contents of /app-portage/pfl/pfl-2.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Fri Jan 24 18:16:17 2014 UTC (9 months, 4 weeks ago) by billie
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 215AD14D)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-portage/pfl/pfl-2.3.ebuild,v 1.9 2013/11/05 19:10:18 billie Exp $
4
5 EAPI=4
6
7 PYTHON_DEPEND=2
8 PYTHON_USE_WITH=xml
9
10 inherit python
11
12 MY_PV=20110906
13
14 DESCRIPTION="PFL is an online searchable file/package database for Gentoo"
15 HOMEPAGE="http://www.portagefilelist.de/index.php/Special:PFLQuery2"
16 SRC_URI="http://files.portagefilelist.de/${P}
17 http://files.portagefilelist.de/e-file-${MY_PV}"
18
19 LICENSE="GPL-2"
20 SLOT="0"
21 KEYWORDS="amd64 arm ppc sparc x86"
22 IUSE="+network-cron"
23
24 DEPEND=""
25 RDEPEND="${DEPEND}
26 net-misc/curl
27 sys-apps/portage"
28
29 S="${WORKDIR}"
30
31 pkg_setup() {
32 python_set_active_version 2
33 python_pkg_setup
34 }
35
36 src_unpack() {
37 cp "${DISTDIR}/${P}" "${WORKDIR}/${PN}.py" || die
38 cp "${DISTDIR}/e-file-${MY_PV}" "${WORKDIR}/e-file" || die
39 }
40
41 src_install() {
42 local cmd="$(PYTHON) -O $(python_get_sitedir)/${PN}/${PN}.py"
43
44 exeinto $(python_get_sitedir)/${PN}
45 doexe ${PN}.py
46
47 dobin e-file
48
49 dodir /var/lib/${PN}
50
51 # create wrapper script to run pfl manually
52 cat > "${T}/${PN}" <<- EOF
53 #!${EPREFIX}/bin/sh
54 ${cmd}
55 EOF
56 dosbin "${T}/${PN}"
57
58 if use network-cron ; then
59 # modify the wrapper script to be usable as cron job
60 sed -i -e "s|${cmd}|exec nice ${cmd} >/dev/null|g" "${T}/${PN}" || die
61 exeinto /etc/cron.weekly
62 doexe "${T}/${PN}"
63 fi
64 }
65
66 pkg_postinst() {
67 python_mod_optimize ${PN}
68
69 if [[ ! -e "${EROOT%/}/var/lib/${PN}/pfl.info" ]]; then
70 touch "${EROOT%/}/var/lib/${PN}/pfl.info" || die
71 chown -R 0:portage "${EROOT%/}/var/lib/${PN}" || die
72 chmod 775 "${EROOT%/}/var/lib/${PN}" || die
73 fi
74 }
75
76 pkg_postrm() {
77 python_mod_cleanup ${PN}
78 }

  ViewVC Help
Powered by ViewVC 1.1.20