/[gentoo-x86]/net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild
Gentoo

Contents of /net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Oct 17 18:32:08 2011 UTC (7 years, 11 months ago) by jer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Old.

(Portage version: 2.2.0_alpha68/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild,v 1.1 2011/05/24 21:48:33 jer Exp $
4
5 EAPI="3"
6
7 inherit eutils cmake-utils
8
9 DESCRIPTION="Yet another implementation of an HTTP proxy for Debian/Ubuntu software packages written in C++"
10 HOMEPAGE="http://www.unix-ag.uni-kl.de/~bloch/acng/"
11 LICENSE="as-is"
12 SLOT="0"
13 SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.gz"
14
15 KEYWORDS="~amd64 ~x86"
16 IUSE="doc fuse"
17
18 COMMON_DEPEND="
19 app-arch/bzip2
20 sys-libs/zlib
21 "
22 DEPEND="
23 ${COMMON_DEPEND}
24 dev-util/cmake
25 "
26 RDEPEND="
27 ${COMMON_DEPEND}
28 dev-lang/perl
29 fuse? ( sys-fs/fuse )
30 "
31
32 pkg_setup() {
33 # add new user & group for daemon
34 enewgroup ${PN}
35 enewuser ${PN} -1 -1 -1 ${PN}
36 }
37
38 src_configure(){
39 mycmakeargs="-DCMAKE_INSTALL_PREFIX=/usr"
40 if use fuse; then
41 mycmakeargs="-DHAVE_FUSE_26=yes ${mycmakeargs}"
42 else
43 mycmakeargs="-DHAVE_FUSE_26=no ${mycmakeargs}"
44 fi
45
46 cmake-utils_src_configure
47 }
48
49 src_install() {
50 pushd ${CMAKE_BUILD_DIR}
51 dosbin ${PN} || die
52 if use fuse
53 then dobin acngfs || die
54 fi
55 popd
56
57 newinitd "${FILESDIR}"/initd ${PN} || die "Can't add new init.d ${PN}"
58 newconfd "${FILESDIR}"/confd ${PN} || die "Can't add new conf.d ${PN}"
59
60 insinto /etc/logrotate.d
61 newins "${FILESDIR}"/logrotate ${PN} || die "Can't install new file ${PN} into '/etc/logrotate.d'"
62
63 doman doc/man/${PN}* || die "Can't install mans"
64 if use fuse; then doman doc/man/acngfs* || die "Can't install man pages for fusefs"; fi
65
66 # Documentation
67 dodoc README TODO VERSION INSTALL ChangeLog || die "Can't install common docs"
68 if use doc; then
69 dodoc doc/*.pdf || die "Can't install docs"
70 dohtml doc/html/* || die "Can't install html docs"
71 docinto examples/conf
72 dodoc conf/* || die "Can't install config examples"
73 fi
74
75 # perl daily cron script
76 dosbin expire-caller.pl || die
77 exeinto /etc/cron.daily
78 newexe "${FILESDIR}"/cron.daily ${PN} || die
79
80 # default configuration
81 insinto /etc/${PN}
82 newins conf/acng.conf ${PN}.conf || die
83 newins conf/report.html report.html || die
84 newins conf/deb_mirrors.gz deb_mirrors.gz || die
85 newins conf/debvol_mirrors.gz debvol_mirrors.gz || die
86 newins conf/ubuntu_mirrors ubuntu_mirrors || die
87 newins conf/archlx_mirrors archlx_mirrors || die
88 newins conf/sfnet_mirrors sfnet_mirrors || die
89 newins conf/cygwin_mirrors cygwin_mirrors || die
90 newins conf/security.conf security.conf || die
91 newins conf/maint.html maint.html || die
92 newins conf/userinfo.html userinfo.html || die
93 newins conf/style.css style.css || die
94
95 dodir /var/cache/${PN} || die
96 dodir /var/log/${PN} || die
97 # Some directories must exists
98 keepdir /var/log/${PN}
99 keepdir /var/run/${PN}
100 fowners -R ${PN}:${PN} \
101 /etc/${PN} \
102 /var/log/${PN} \
103 /var/cache/${PN} \
104 /var/run/${PN} || die
105 }

  ViewVC Help
Powered by ViewVC 1.1.20