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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Jun 20 05:57:22 2015 UTC (4 years, 2 months ago) by jer
Branch: MAIN
CVS Tags: HEAD
Version bump.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key A792A613)

1 # Copyright 1999-2015 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.8.3.ebuild,v 1.1 2015/05/03 07:57:53 jer Exp $
4
5 EAPI=5
6 inherit cmake-utils eutils toolchain-funcs user
7
8 DESCRIPTION="Yet another implementation of an HTTP proxy for Debian/Ubuntu software packages written in C++"
9 HOMEPAGE="
10 http://www.unix-ag.uni-kl.de/~bloch/acng/
11 http://packages.qa.debian.org/a/apt-cacher-ng.html
12 "
13 LICENSE="BSD-4 ZLIB public-domain"
14 SLOT="0"
15 SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.xz"
16
17 KEYWORDS="~amd64 ~x86"
18 IUSE="doc fuse systemd tcpd"
19
20 COMMON_DEPEND="
21 app-arch/bzip2
22 app-arch/xz-utils
23 sys-libs/zlib
24 systemd? (
25 sys-apps/systemd
26 )
27 "
28 DEPEND="
29 ${COMMON_DEPEND}
30 dev-util/cmake
31 >sys-devel/gcc-4.8
32 virtual/pkgconfig
33 "
34 RDEPEND="
35 ${COMMON_DEPEND}
36 dev-lang/perl
37 fuse? ( sys-fs/fuse )
38 tcpd? ( sys-apps/tcp-wrappers )
39 "
40
41 S=${WORKDIR}/${P/_}
42
43 pkg_pretend() {
44 if [[ $(gcc-major-version) = 4 ]]; then
45 if [[ $(gcc-minor-version) -lt 8 ]]; then
46 die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
47 fi
48 else
49 die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
50 fi
51 }
52
53 pkg_setup() {
54 # add new user & group for daemon
55 enewgroup ${PN}
56 enewuser ${PN} -1 -1 -1 ${PN}
57 }
58
59 src_configure(){
60 mycmakeargs="-DCMAKE_INSTALL_PREFIX=/usr"
61 if use fuse; then
62 mycmakeargs="-DHAVE_FUSE_25=yes ${mycmakeargs}"
63 else
64 mycmakeargs="-DHAVE_FUSE_25=no ${mycmakeargs}"
65 fi
66 if use tcpd; then
67 mycmakeargs="-DHAVE_LIBWRAP=yes ${mycmakeargs}"
68 else
69 mycmakeargs="-DHAVE_LIBWRAP=no ${mycmakeargs}"
70 fi
71
72 cmake-utils_src_configure
73 }
74
75 src_install() {
76 pushd ${CMAKE_BUILD_DIR}
77 dosbin ${PN}
78 if use fuse; then
79 dobin acngfs
80 fi
81 popd
82
83 newinitd "${FILESDIR}"/initd-r1 ${PN}
84 newconfd "${FILESDIR}"/confd ${PN}
85
86 insinto /etc/logrotate.d
87 newins "${FILESDIR}"/logrotate ${PN}
88
89 doman doc/man/${PN}*
90 if use fuse; then
91 doman doc/man/acngfs*
92 fi
93
94 # Documentation
95 dodoc README TODO VERSION INSTALL ChangeLog
96 if use doc; then
97 dodoc doc/*.pdf
98 dohtml doc/html/*
99 docinto examples/conf
100 dodoc conf/*
101 fi
102
103 # perl daily cron script
104 dosbin scripts/expire-caller.pl
105 exeinto /etc/cron.daily
106 newexe "${FILESDIR}"/cron.daily ${PN}
107
108 # default configuration
109 insinto /etc/${PN}
110 newins conf/acng.conf ${PN}.conf
111 doins $( echo conf/* | sed 's|conf/acng.conf||g' )
112
113 keepdir /var/log/${PN}
114 # Some directories must exists
115 keepdir /var/log/${PN}
116 fowners -R ${PN}:${PN} \
117 /etc/${PN} \
118 /var/log/${PN}
119 }

  ViewVC Help
Powered by ViewVC 1.1.20