summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2021-08-21 18:19:40 -0500
committerJohn Helmert III <ajak@gentoo.org>2021-08-21 18:20:51 -0500
commita786bf0592e537ff939e17466940a06c79f84320 (patch)
tree0f5c6885bf13e24e81a41b9830c6c1fbea46becc /net-misc/apt-cacher-ng
parentnet-misc/apt-cacher-ng: fix tmpfiles handling (diff)
downloadgentoo-a786bf0592e537ff939e17466940a06c79f84320.tar.gz
gentoo-a786bf0592e537ff939e17466940a06c79f84320.tar.bz2
gentoo-a786bf0592e537ff939e17466940a06c79f84320.zip
net-misc/apt-cacher-ng: propagate some fixes to live ebuild
Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to 'net-misc/apt-cacher-ng')
-rw-r--r--net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild31
1 files changed, 18 insertions, 13 deletions
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild
index c69b956cb3c7..317ac95f9c39 100644
--- a/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit cmake git-r3
+inherit cmake git-r3 tmpfiles
DESCRIPTION="Yet another caching HTTP proxy for Debian/Ubuntu software packages"
HOMEPAGE="https://www.unix-ag.uni-kl.de/~bloch/acng/
@@ -13,7 +13,7 @@ EGIT_BRANCH="upstream/sid"
LICENSE="BSD-4 ZLIB public-domain"
SLOT="0"
-IUSE="doc fuse tcpd"
+IUSE="doc fuse systemd tcpd"
DEPEND="acct-user/apt-cacher-ng
acct-group/apt-cacher-ng
@@ -22,6 +22,7 @@ DEPEND="acct-user/apt-cacher-ng
dev-libs/openssl:0=
sys-libs/zlib
fuse? ( sys-fs/fuse:0 )
+ systemd? ( sys-apps/systemd )
tcpd? ( sys-apps/tcp-wrappers )"
BDEPEND="virtual/pkgconfig"
RDEPEND="${DEPEND}
@@ -41,10 +42,11 @@ src_prepare() {
# Make sure we install everything the same way it used to be after
# switching from mostly custom src_install to relying on build system
# installation
- sed -ie "/install/s/LIBDIR/CFGDIR/" conf/CMakeLists.txt || die
- sed -ie '/install.*acng\.conf/s/)$/ RENAME '"${PN}"'.conf)/' conf/CMakeLists.txt || die
- sed -ie '/file/s/)$/ "*hooks" "backends_debian")/' conf/CMakeLists.txt || die
+ sed -e "/install/s/LIBDIR/CFGDIR/" \
+ -e '/install.*acng\.conf/s/)$/ RENAME '"${PN}"'.conf)/' \
+ -e '/file/s/)$/ "*hooks" "backends_debian")/' -i conf/CMakeLists.txt || die
sed -ie "/INSTALL.*acngtool/s/LIBDIR/CMAKE_INSTALL_SBINDIR/" source/CMakeLists.txt || die
+
cmake_src_prepare
}
@@ -52,22 +54,21 @@ src_configure() {
local mycmakeargs=(
"-DHAVE_FUSE_25=$(usex fuse)"
"-DHAVE_LIBWRAP=$(usex tcpd)"
- # Unconditionally install systemd service file
- "-DSDINSTALL=1"
+ "-DSDINSTALL=$(usex systemd)"
)
- if tc-ld-is-gold; then
- mycmakeargs+=( "-DUSE_GOLD=yes" )
- else
- mycmakeargs+=( "-DUSE_GOLD=no" )
- fi
-
cmake_src_configure
sed -ie '/LogDir/s|/var/tmp|/var/log/'"${PN}"'|g' "${BUILD_DIR}"/conf/acng.conf || die
}
src_install() {
+ # README is a symlink to doc/README and README automatically gets
+ # installed, leading to a broken symlink installed. Fix this by removing
+ # the symlink then installing the actual README. https://bugs.gentoo.org/770046
+ rm README || die
+ dodoc doc/README
+
newinitd "${FILESDIR}/initd-r3" "${PN}"
newconfd "${FILESDIR}/confd-r2" "${PN}"
@@ -93,3 +94,7 @@ src_install() {
cmake_src_install
}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+}