Gentoo Archives: gentoo-commits

From: John Helmert III <ajak@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/apt-cacher-ng/
Date: Sat, 21 Aug 2021 23:25:06
Message-Id: 1629588051.a786bf0592e537ff939e17466940a06c79f84320.ajak@gentoo
1 commit: a786bf0592e537ff939e17466940a06c79f84320
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 21 23:19:40 2021 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 21 23:20:51 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a786bf05
7
8 net-misc/apt-cacher-ng: propagate some fixes to live ebuild
9
10 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
11
12 net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild | 31 ++++++++++++++----------
13 1 file changed, 18 insertions(+), 13 deletions(-)
14
15 diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild
16 index c69b956cb3c..317ac95f9c3 100644
17 --- a/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild
18 +++ b/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild
19 @@ -3,7 +3,7 @@
20
21 EAPI=7
22
23 -inherit cmake git-r3
24 +inherit cmake git-r3 tmpfiles
25
26 DESCRIPTION="Yet another caching HTTP proxy for Debian/Ubuntu software packages"
27 HOMEPAGE="https://www.unix-ag.uni-kl.de/~bloch/acng/
28 @@ -13,7 +13,7 @@ EGIT_BRANCH="upstream/sid"
29
30 LICENSE="BSD-4 ZLIB public-domain"
31 SLOT="0"
32 -IUSE="doc fuse tcpd"
33 +IUSE="doc fuse systemd tcpd"
34
35 DEPEND="acct-user/apt-cacher-ng
36 acct-group/apt-cacher-ng
37 @@ -22,6 +22,7 @@ DEPEND="acct-user/apt-cacher-ng
38 dev-libs/openssl:0=
39 sys-libs/zlib
40 fuse? ( sys-fs/fuse:0 )
41 + systemd? ( sys-apps/systemd )
42 tcpd? ( sys-apps/tcp-wrappers )"
43 BDEPEND="virtual/pkgconfig"
44 RDEPEND="${DEPEND}
45 @@ -41,10 +42,11 @@ src_prepare() {
46 # Make sure we install everything the same way it used to be after
47 # switching from mostly custom src_install to relying on build system
48 # installation
49 - sed -ie "/install/s/LIBDIR/CFGDIR/" conf/CMakeLists.txt || die
50 - sed -ie '/install.*acng\.conf/s/)$/ RENAME '"${PN}"'.conf)/' conf/CMakeLists.txt || die
51 - sed -ie '/file/s/)$/ "*hooks" "backends_debian")/' conf/CMakeLists.txt || die
52 + sed -e "/install/s/LIBDIR/CFGDIR/" \
53 + -e '/install.*acng\.conf/s/)$/ RENAME '"${PN}"'.conf)/' \
54 + -e '/file/s/)$/ "*hooks" "backends_debian")/' -i conf/CMakeLists.txt || die
55 sed -ie "/INSTALL.*acngtool/s/LIBDIR/CMAKE_INSTALL_SBINDIR/" source/CMakeLists.txt || die
56 +
57 cmake_src_prepare
58 }
59
60 @@ -52,22 +54,21 @@ src_configure() {
61 local mycmakeargs=(
62 "-DHAVE_FUSE_25=$(usex fuse)"
63 "-DHAVE_LIBWRAP=$(usex tcpd)"
64 - # Unconditionally install systemd service file
65 - "-DSDINSTALL=1"
66 + "-DSDINSTALL=$(usex systemd)"
67 )
68
69 - if tc-ld-is-gold; then
70 - mycmakeargs+=( "-DUSE_GOLD=yes" )
71 - else
72 - mycmakeargs+=( "-DUSE_GOLD=no" )
73 - fi
74 -
75 cmake_src_configure
76
77 sed -ie '/LogDir/s|/var/tmp|/var/log/'"${PN}"'|g' "${BUILD_DIR}"/conf/acng.conf || die
78 }
79
80 src_install() {
81 + # README is a symlink to doc/README and README automatically gets
82 + # installed, leading to a broken symlink installed. Fix this by removing
83 + # the symlink then installing the actual README. https://bugs.gentoo.org/770046
84 + rm README || die
85 + dodoc doc/README
86 +
87 newinitd "${FILESDIR}/initd-r3" "${PN}"
88 newconfd "${FILESDIR}/confd-r2" "${PN}"
89
90 @@ -93,3 +94,7 @@ src_install() {
91
92 cmake_src_install
93 }
94 +
95 +pkg_postinst() {
96 + tmpfiles_process "${PN}.conf"
97 +}