Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/apt-cacher-ng/
Date: Wed, 22 May 2019 06:06:06
Message-Id: 1558505159.36f6d7b98ece51c3607837fc482687e6c7b0ea87.jer@gentoo
1 commit: 36f6d7b98ece51c3607837fc482687e6c7b0ea87
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 22 06:05:41 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed May 22 06:05:59 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36f6d7b9
7
8 net-misc/apt-cacher-ng: Version 3.2_p2
9
10 Package-Manager: Portage-2.3.66, Repoman-2.3.12
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-misc/apt-cacher-ng/Manifest | 1 +
14 net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2.ebuild | 126 +++++++++++++++++++++
15 2 files changed, 127 insertions(+)
16
17 diff --git a/net-misc/apt-cacher-ng/Manifest b/net-misc/apt-cacher-ng/Manifest
18 index 21498d91e43..75ce6eb025d 100644
19 --- a/net-misc/apt-cacher-ng/Manifest
20 +++ b/net-misc/apt-cacher-ng/Manifest
21 @@ -1 +1,2 @@
22 +DIST apt-cacher-ng_3.2-2.debian.tar.xz 48740 BLAKE2B ab2f6349aa66f39b778f346827767514761eeb8977d69a55940d7dd4c738b54ba20a9725387f769edf2cce454588746bc10361d4a174ed380a431a6ecf6b096d SHA512 e5299432b91cdf6cb51934fcc440e62d24c1b4849ad3a0c3a5e47a256c874ebb85c7ba56b97da27c2e03e0621b4ae42b69592440d521e718f4f8725a6ff379d4
23 DIST apt-cacher-ng_3.2.orig.tar.xz 319036 BLAKE2B 576fc7a409556d34ee702edd57527c9c35eb033d0e8c8ea4f7b8a8a2dae86f75cd1ca3a7fb0e02845e70d6f8715692b638ff9d574ce1664b67fec9247b60fbc0 SHA512 7dfee4a8f38e7c5251c761a5faae063926c5001fe0b97136d938cdbff907e97fb0a20b89dcf685645a518e92be04fe5660d840e738960b4465408f04fe532cae
24
25 diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2.ebuild
26 new file mode 100644
27 index 00000000000..97f303d5634
28 --- /dev/null
29 +++ b/net-misc/apt-cacher-ng/apt-cacher-ng-3.2_p2.ebuild
30 @@ -0,0 +1,126 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +inherit cmake-utils toolchain-funcs user
36 +
37 +DESCRIPTION="Yet another caching HTTP proxy for Debian/Ubuntu software packages"
38 +HOMEPAGE="
39 + https://www.unix-ag.uni-kl.de/~bloch/acng/
40 + https://packages.qa.debian.org/a/apt-cacher-ng.html
41 +"
42 +LICENSE="BSD-4 ZLIB public-domain"
43 +SLOT="0"
44 +SRC_URI="
45 + mirror://debian/pool/main/a/${PN}/${PN}_${PV/_*}.orig.tar.xz
46 + mirror://debian/pool/main/a/${PN}/${PN}_${PV/_p/-}.debian.tar.xz
47 +"
48 +
49 +KEYWORDS="~amd64 ~x86"
50 +IUSE="doc fuse systemd tcpd"
51 +
52 +COMMON_DEPEND="
53 + app-arch/bzip2
54 + app-arch/xz-utils
55 + dev-libs/openssl:*
56 + sys-libs/zlib
57 + systemd? (
58 + sys-apps/systemd
59 + )
60 +"
61 +DEPEND="
62 + ${COMMON_DEPEND}
63 + dev-util/cmake
64 + >sys-devel/gcc-4.8
65 + virtual/pkgconfig
66 +"
67 +RDEPEND="
68 + ${COMMON_DEPEND}
69 + dev-lang/perl
70 + fuse? ( sys-fs/fuse )
71 + tcpd? ( sys-apps/tcp-wrappers )
72 +"
73 +PATCHES=(
74 + "${WORKDIR}"/debian/patches/debian-changes
75 +)
76 +S=${WORKDIR}/${P/_*}
77 +
78 +pkg_pretend() {
79 + if [[ $(gcc-major-version) -lt 4 ]]; then
80 + die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
81 + elif [[ $(gcc-major-version) = 4 ]] && [[ $(gcc-minor-version) -lt 8 ]]; then
82 + die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
83 + fi
84 +}
85 +
86 +pkg_setup() {
87 + # add new user & group for daemon
88 + enewgroup ${PN}
89 + enewuser ${PN} -1 -1 -1 ${PN}
90 +}
91 +
92 +src_configure(){
93 + mycmakeargs=( "-DCMAKE_INSTALL_PREFIX=/usr" )
94 + if use fuse; then
95 + mycmakeargs+=( "-DHAVE_FUSE_25=yes" )
96 + else
97 + mycmakeargs+=( "-DHAVE_FUSE_25=no" )
98 + fi
99 + if use tcpd; then
100 + mycmakeargs=( "-DHAVE_LIBWRAP=yes" )
101 + else
102 + mycmakeargs=( "-DHAVE_LIBWRAP=no" )
103 + fi
104 +
105 + cmake-utils_src_configure
106 +}
107 +
108 +src_install() {
109 + pushd ${BUILD_DIR} || die
110 + dosbin ${PN}
111 + if use fuse; then
112 + dobin acngfs
113 + fi
114 + popd
115 +
116 + newinitd "${FILESDIR}"/initd-r1 ${PN}
117 + newconfd "${FILESDIR}"/confd ${PN}
118 +
119 + insinto /etc/logrotate.d
120 + newins "${FILESDIR}"/logrotate ${PN}
121 +
122 + doman doc/man/${PN}*
123 + if use fuse; then
124 + doman doc/man/acngfs*
125 + fi
126 +
127 + # Documentation
128 + dodoc doc/README TODO VERSION INSTALL ChangeLog
129 + if use doc; then
130 + dodoc doc/*.pdf
131 +
132 + docinto html
133 + dodoc doc/html/*
134 +
135 + find conf -name '*.gz' -exec gzip -d {} \; || die
136 + docinto examples/conf
137 + dodoc conf/*
138 + fi
139 +
140 + # perl daily cron script
141 + dosbin scripts/expire-caller.pl
142 + exeinto /etc/cron.daily
143 + newexe "${FILESDIR}"/cron.daily ${PN}
144 +
145 + # default configuration
146 + insinto /etc/${PN}
147 + newins "${BUILD_DIR}"/conf/acng.conf ${PN}.conf
148 + doins $( echo conf/* | sed 's|conf/acng.conf.in||g' )
149 +
150 + keepdir /var/log/${PN}
151 + # Some directories must exists
152 + keepdir /var/log/${PN}
153 + fowners -R ${PN}:${PN} \
154 + /etc/${PN} \
155 + /var/log/${PN}
156 +}