diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-11-18 10:15:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-11-18 10:15:03 +0000 |
commit | b284a3168fa91a038925d2ecf5e4791011ea5e7d (patch) | |
tree | 16fe44748708acacd909d4e2e160a09a7f6d936a /net-misc/apt-cacher-ng | |
parent | 77398e424e45d9e98c1cef3c43bdadb9d56e81ef (diff) |
gentoo resync : 18.11.2019
Diffstat (limited to 'net-misc/apt-cacher-ng')
-rw-r--r-- | net-misc/apt-cacher-ng/Manifest | 9 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/apt-cacher-ng-3.3_p1-r1.ebuild | 131 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/apt-cacher-ng-3.3_p1.ebuild (renamed from net-misc/apt-cacher-ng/apt-cacher-ng-3.2.ebuild) | 35 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/apt-cacher-ng-3.3-flags.patch | 75 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/confd-r1 | 3 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/initd | 32 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/initd-r2 | 34 |
7 files changed, 273 insertions, 46 deletions
diff --git a/net-misc/apt-cacher-ng/Manifest b/net-misc/apt-cacher-ng/Manifest index 2e7a32c4ce7e..05effe99c163 100644 --- a/net-misc/apt-cacher-ng/Manifest +++ b/net-misc/apt-cacher-ng/Manifest @@ -1,11 +1,16 @@ AUX apt-cacher-ng-3.2-flags.patch 4172 BLAKE2B 9068ada51f5c12a662f521eee7a834c6eb07299a41671a6d8b47474bdbe15f1c25f531a9f2d058af97ee77d6ddb05fdfa64f018f3bb2ceaad51ac6b7a5f66903 SHA512 b57dc514d976b6f808c332c36c5014a407ec1e7184fb8653404dcf745872b03611ccc9f33bc42846429dc389b4b91831f308874deca4682e6dc636ea4c707713 +AUX apt-cacher-ng-3.3-flags.patch 2661 BLAKE2B 7a1d477819aae614b7598cec314de9627d9f56f974d4d5970be5b624b7cb6d6896f591a2d3eeea0e5af4f8cf264340cceb5a51961fae96343348180f0f66266e SHA512 e03aecb4332d34c1ed9dfe92e9c2fdd1a7f2e7a353039f9b86d14f7717fad2519c32f75a53614653323cf28f65705139244b5851fa6645f7461ecf3fce40394c AUX confd 90 BLAKE2B 5a0ba4fe7d07c4d74559f194cc497b0de5ea86db746fa8425267b9e1fe0d88afc3bae69129a60f4553729d24dfd09f910c037742181915d03f4c18b764f235cd SHA512 14412f717ad334e6ce5cf65b9b0968fc3ab27e93f3d3ce52d39e0b646694e8e7d7905ede25feeabad6ef3301b5644677f30e27b867ff32f665ab6c4e2cd0a662 +AUX confd-r1 100 BLAKE2B e5f0e9ca77d9d3b30a0a59a755e286a914d1ed81a2afd47ed0fd2563eca81ec9db8e50aa9d34c9e31b1014ecf2db7e85cb055d7a67af494bf88c2ec9b9c13465 SHA512 c58ecc104ab7fa90cbccc1d9f9725c9ddad84bb7225ea3eea56d7874b060ce453e4576ca055e014b9621b9514d95a189915fead2057557fb785d9520d7121831 AUX cron.daily 459 BLAKE2B 8798bcc7f57cfe0798fc6594dccf89165df88361510ceb962ff8cd70bd10c15f2cc8acff11ad0e2051d6a6bfe65e53e438d5fee9a60ac293334561f603adbedf SHA512 3e42afb0be6235594e2ccf68d0fd4c7be4954d6583562e1692e98ab55e8fdc74026690b01417e4b6fc9fe288df40e66e5e63e5a1fd98d5484c6eb366aa1b4d4a -AUX initd 725 BLAKE2B 3984d5c7f4b34fdb16420d29935edf2a5975e5f7aca2559506ba839d21d781f0a5a5f914bbd35efcc73dfa70d0610ed57b51b3ec9b66de0d77e864c59bf5fa04 SHA512 de8dbff432540d3b725556bb9189e14cf06afc876ec636a9ae2a00ee6158f791a9306c2630cfbf11de80b81ffadb45f39bae235c5d9ee76b5245c0599a387b0a AUX initd-r1 906 BLAKE2B 828ac672348454842e3daeb62e39436dce86f3ff9ba2319755f2bc64a20d3dc9e73689c27f79e7f521b6d6553c5d6922eb1b8d72a52a97c7f92b2847b6322b9d SHA512 c4aa04ea30734f00c617684ea014c632bf0d43580ae7b7c6e9ae58e2c947d15177f93e7b92fd9f7b79d1898d0c6a386de1da7fa038dace6381cd72907845e57c +AUX initd-r2 1003 BLAKE2B f8e87da524cb10358420de9bc7e76d5b954cdfa70ba54637ca0b4653c1f718eebe77bbc3220003691d7163374f3af0aa4ca8568b76218d7214e2e498c2998f79 SHA512 f57c58074bbe1c35b748f94bf2a8a4aa10f8264e662b61c1178582f16f5e53c38941e9b2c2c0a46718ab8615ff426a887f64fe170da42b7aaaa9bb3c23a0fc00 AUX logrotate 377 BLAKE2B deaa8badb74a660419df29efc02d0f00d3100c4357f43e02c7c9eba305902a204d3b61073a3e483b0f7d614ddf4053bdc731737c5199b792380a922e25e2a49f SHA512 c2f4be7294953a63a89e5beee40029e03faa1db49986a6f8d974def67b064d391be13ecddec0d6b4d7ec369db6dcd0bafc328e90b54ccec911df739c719fd885 DIST apt-cacher-ng_3.2-2.debian.tar.xz 48740 BLAKE2B ab2f6349aa66f39b778f346827767514761eeb8977d69a55940d7dd4c738b54ba20a9725387f769edf2cce454588746bc10361d4a174ed380a431a6ecf6b096d SHA512 e5299432b91cdf6cb51934fcc440e62d24c1b4849ad3a0c3a5e47a256c874ebb85c7ba56b97da27c2e03e0621b4ae42b69592440d521e718f4f8725a6ff379d4 DIST apt-cacher-ng_3.2.orig.tar.xz 319036 BLAKE2B 576fc7a409556d34ee702edd57527c9c35eb033d0e8c8ea4f7b8a8a2dae86f75cd1ca3a7fb0e02845e70d6f8715692b638ff9d574ce1664b67fec9247b60fbc0 SHA512 7dfee4a8f38e7c5251c761a5faae063926c5001fe0b97136d938cdbff907e97fb0a20b89dcf685645a518e92be04fe5660d840e738960b4465408f04fe532cae -EBUILD apt-cacher-ng-3.2.ebuild 2495 BLAKE2B a70da3cd229c554d91ee3ea67c9feaa2eb7259902203efe366e84a9af12fc17ae0eed4fd09be05e90d6a5252cdf36fe47068821db64e81af0053fdfd767aacc1 SHA512 49c0eb48c086f9631750f3875be888751dbefd7b268538bc3dfa3e61eb6517564202ffd1a71eb95e3a428b1212942716b2cd15f42fa8319b3cee3042e515fcb6 +DIST apt-cacher-ng_3.3-1.debian.tar.xz 48472 BLAKE2B 9d7f531d84f470ada8236a5603d06e45d9b7acb7bdeb8bd639c250724013a0552819cabe67f1cee0a1f337d7725429932bdf179afae307242e4d45081854614e SHA512 44a241791b92d6b9231caff8296ed1d9536ffcdc18263451d662da01f1b257b8ea4741e5cfb09c5cd90986c46fe1e91b3110379442d9ed20434e696c6cf645aa +DIST apt-cacher-ng_3.3.orig.tar.xz 320884 BLAKE2B c4bda8de90f76e7cb8335fdb758571db030c1298881afceb865f84e506aeb82e4db69c5c091debfdcf6c85bc8d4e703b75725ae6b06f2e412ba4b4362d568a05 SHA512 01a09bc13d2a9d24ee3012a21ae954362715bc0b69ef021a3446ad7d78157209aaaf941fbb02b0e5323bfb0337a1e3d6450c07b680d42f7bf93855d7ac65c60f EBUILD apt-cacher-ng-3.2_p2-r2.ebuild 2715 BLAKE2B cf204efafbd483b174bd2f0627dd81c0d04bf9c232a4c7e694c43e0ad5dca58eb69180bb27e5f80f1981643d0696689c724a8417e56c4a1c7be032ac476760cf SHA512 bc9486e131b1d6fd294d50a62d9e20ac3e25d4fd24de9f28e334f6504140bd0a7217b1af0832ad70df5a08cbadced4229a51a7bb6df7e5a5b861bd6b3f24d98c +EBUILD apt-cacher-ng-3.3_p1-r1.ebuild 2807 BLAKE2B 7d8fdc71ae134fe136b05ea1482640727960e134dff98cd200328c9e87ce378a88f6dda930da58123db17c157255c0f8e4e5282424beb3d41a42ba11f60e5bd0 SHA512 6c9428d87835712ee4676f24653adaec346a441e18de1f4bc4cc70e3b803546d84d5956994216fa474d2973a62c1e841b7ffd07ab9ba15d55d817e413355aa04 +EBUILD apt-cacher-ng-3.3_p1.ebuild 2713 BLAKE2B 51d2c1171543ff2aab95cbe97e5b3cb8d92e66ca7e8764227e71bce6dd8c1a0048e791d2fabe833bcd81104852b360f33ba06acc0dd1339476635e5445cc1026 SHA512 56ebef8ba58686261ebd7e4472e0c63f7494fe844c87d9eb531b4ad3e8ef02816cb5f31b34933649e1c542b2f60641d303550d75e84e5cd08d49af2e01f7ad0b MISC metadata.xml 493 BLAKE2B 6c2fb1f7abaee7df8db9ccdd7b71774230ddf2dc860d59f65a1cb77560532eb363e550bef6df18a63a78858a0a2469b0eb011d8bf0d41bf36a4c1b11223f0b2d SHA512 58f1345b841c7d5105432d0dab345033b9cefcfd4dedfe05f52d25135716be336a2f4a5fee3288236239bae9bbb1381deff0917fff8c80d81caaf64e8706b5a6 diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-3.3_p1-r1.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-3.3_p1-r1.ebuild new file mode 100644 index 000000000000..682a66fd9f07 --- /dev/null +++ b/net-misc/apt-cacher-ng/apt-cacher-ng-3.3_p1-r1.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit cmake-utils toolchain-funcs user + +DESCRIPTION="Yet another caching HTTP proxy for Debian/Ubuntu software packages" +HOMEPAGE=" + https://www.unix-ag.uni-kl.de/~bloch/acng/ + https://packages.qa.debian.org/a/apt-cacher-ng.html +" +LICENSE="BSD-4 ZLIB public-domain" +SLOT="0" +SRC_URI=" + mirror://debian/pool/main/a/${PN}/${PN}_${PV/_*}.orig.tar.xz + mirror://debian/pool/main/a/${PN}/${PN}_${PV/_p/-}.debian.tar.xz +" + +KEYWORDS="~amd64 ~x86" +IUSE="doc fuse systemd tcpd" + +COMMON_DEPEND=" + app-arch/bzip2 + app-arch/xz-utils + dev-libs/openssl:0= + sys-libs/zlib + systemd? ( + sys-apps/systemd + ) +" +BDEPEND=" + ${COMMON_DEPEND} + dev-util/cmake + >sys-devel/gcc-4.8 + virtual/pkgconfig +" +RDEPEND=" + ${COMMON_DEPEND} + dev-lang/perl + fuse? ( sys-fs/fuse ) + tcpd? ( sys-apps/tcp-wrappers ) +" +PATCHES=( + "${FILESDIR}"/${PN}-3.3-flags.patch +) +S=${WORKDIR}/${P/_*} + +pkg_pretend() { + if [[ $(gcc-major-version) -lt 4 ]]; then + die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)" + elif [[ $(gcc-major-version) = 4 ]] && [[ $(gcc-minor-version) -lt 8 ]]; then + die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)" + fi +} + +pkg_setup() { + # add new user & group for daemon + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_configure(){ + mycmakeargs=( + "-DCMAKE_INSTALL_PREFIX=/usr" + ) + if use fuse; then + mycmakeargs+=( "-DHAVE_FUSE_25=yes" ) + else + mycmakeargs+=( "-DHAVE_FUSE_25=no" ) + fi + if use tcpd; then + mycmakeargs+=( "-DHAVE_LIBWRAP=yes" ) + else + mycmakeargs+=( "-DHAVE_LIBWRAP=no" ) + fi + + cmake-utils_src_configure + + sed -i -e '/LogDir/s|/var/tmp|/var/log/'"${PN}"'|g' "${BUILD_DIR}"/conf/acng.conf || die +} + +src_install() { + pushd "${BUILD_DIR}" || die + dosbin ${PN} acngtool + dolib.so libsupacng.so + if use fuse; then + dobin acngfs + fi + popd || die + + newinitd "${FILESDIR}"/initd-r2 ${PN} + newconfd "${FILESDIR}"/confd-r1 ${PN} + + insinto /etc/logrotate.d + newins "${FILESDIR}"/logrotate ${PN} + + doman doc/man/${PN}* + if use fuse; then + doman doc/man/acngfs* + fi + + # Documentation + dodoc doc/README TODO VERSION INSTALL ChangeLog + if use doc; then + dodoc doc/*.pdf + + docinto html + dodoc doc/html/* + + find conf -name '*.gz' -exec gzip -d {} \; || die + docinto examples/conf + dodoc conf/* + fi + + # perl daily cron script + dosbin scripts/expire-caller.pl + exeinto /etc/cron.daily + newexe "${FILESDIR}"/cron.daily ${PN} + + # default configuration + insinto /etc/${PN} + newins "${BUILD_DIR}"/conf/acng.conf ${PN}.conf + doins $( echo conf/* | sed 's|conf/acng.conf.in||g' ) + + keepdir /var/log/${PN} + # Some directories must exists + keepdir /var/log/${PN} + fowners -R ${PN}:${PN} \ + /etc/${PN} \ + /var/log/${PN} +} diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-3.2.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-3.3_p1.ebuild index d04cec3cc611..a2ab7261f60d 100644 --- a/net-misc/apt-cacher-ng/apt-cacher-ng-3.2.ebuild +++ b/net-misc/apt-cacher-ng/apt-cacher-ng-3.3_p1.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit cmake-utils toolchain-funcs user DESCRIPTION="Yet another caching HTTP proxy for Debian/Ubuntu software packages" @@ -11,7 +11,10 @@ HOMEPAGE=" " LICENSE="BSD-4 ZLIB public-domain" SLOT="0" -SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.xz" +SRC_URI=" + mirror://debian/pool/main/a/${PN}/${PN}_${PV/_*}.orig.tar.xz + mirror://debian/pool/main/a/${PN}/${PN}_${PV/_p/-}.debian.tar.xz +" KEYWORDS="~amd64 ~x86" IUSE="doc fuse systemd tcpd" @@ -25,7 +28,7 @@ COMMON_DEPEND=" sys-apps/systemd ) " -DEPEND=" +BDEPEND=" ${COMMON_DEPEND} dev-util/cmake >sys-devel/gcc-4.8 @@ -37,8 +40,10 @@ RDEPEND=" fuse? ( sys-fs/fuse ) tcpd? ( sys-apps/tcp-wrappers ) " - -S=${WORKDIR}/${P/_} +PATCHES=( + "${FILESDIR}"/${PN}-3.3-flags.patch +) +S=${WORKDIR}/${P/_*} pkg_pretend() { if [[ $(gcc-major-version) -lt 4 ]]; then @@ -55,28 +60,31 @@ pkg_setup() { } src_configure(){ - mycmakeargs=( "-DCMAKE_INSTALL_PREFIX=/usr" ) + mycmakeargs=( + "-DCMAKE_INSTALL_PREFIX=/usr" + ) if use fuse; then mycmakeargs+=( "-DHAVE_FUSE_25=yes" ) else mycmakeargs+=( "-DHAVE_FUSE_25=no" ) fi if use tcpd; then - mycmakeargs=( "-DHAVE_LIBWRAP=yes" ) + mycmakeargs+=( "-DHAVE_LIBWRAP=yes" ) else - mycmakeargs=( "-DHAVE_LIBWRAP=no" ) + mycmakeargs+=( "-DHAVE_LIBWRAP=no" ) fi cmake-utils_src_configure } src_install() { - pushd ${CMAKE_BUILD_DIR} - dosbin ${PN} + pushd "${BUILD_DIR}" || die + dosbin ${PN} acngtool + dolib.so libsupacng.so if use fuse; then dobin acngfs fi - popd + popd || die newinitd "${FILESDIR}"/initd-r1 ${PN} newconfd "${FILESDIR}"/confd ${PN} @@ -93,8 +101,11 @@ src_install() { dodoc doc/README TODO VERSION INSTALL ChangeLog if use doc; then dodoc doc/*.pdf + docinto html dodoc doc/html/* + + find conf -name '*.gz' -exec gzip -d {} \; || die docinto examples/conf dodoc conf/* fi @@ -106,7 +117,7 @@ src_install() { # default configuration insinto /etc/${PN} - newins "${CMAKE_BUILD_DIR}"/conf/acng.conf ${PN}.conf + newins "${BUILD_DIR}"/conf/acng.conf ${PN}.conf doins $( echo conf/* | sed 's|conf/acng.conf.in||g' ) keepdir /var/log/${PN} diff --git a/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.3-flags.patch b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.3-flags.patch new file mode 100644 index 000000000000..a2f43a4d3789 --- /dev/null +++ b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.3-flags.patch @@ -0,0 +1,75 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ + + set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}) + set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}) +-#set(CMAKE_SKIP_BUILD_RPATH on) # no -rdynamic needed ever ++set(CMAKE_SKIP_BUILD_RPATH on) # no -rdynamic needed ever + + INCLUDE(CheckIncludeFiles) + INCLUDE(CheckCXXSourceCompiles) +@@ -27,7 +27,7 @@ + INCLUDE(GNUInstallDirs) + + IF(NOT DEFINED(CMAKE_INSTALL_PREFIX)) +-set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE STRING "Target file space") ++#_cmake_modify_IGNORE set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE STRING "Target file space") + ENDIF() + IF(NOT DEFINED(LIBDIR)) + set(LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}" CACHE STRING "Location of ${PACKAGE} extra files") +@@ -94,23 +94,6 @@ + _append(ACNG_CXXFLAGS -fvisibility-inlines-hidden) + endif() + +-foreach(linkarg -Wl,--as-needed -Wl,-O1 -Wl,--discard-all -Wl,--no-undefined -Wl,--build-id=sha1 -Wl,-fuse-ld=gold) +- STRING(REGEX REPLACE "=|-|," "" optname "${linkarg}") +- set(CMAKE_REQUIRED_FLAGS "${linkarg}") +- CHECK_CXX_COMPILER_FLAG("" "LD_${optname}") +- if(LD_${optname}) +- _append(CMAKE_EXE_LINKER_FLAGS ${linkarg}) +- endif() +- set(CMAKE_REQUIRED_FLAGS "") +-endforeach(linkarg) +- +-set(CMAKE_REQUIRED_FLAGS "-Wl,-fuse-ld=gold -Wl,--threads") +-CHECK_CXX_COMPILER_FLAG("" LD_MULTITHREADED) +-if(LD_MULTITHREADED) +- _append(CMAKE_EXE_LINKER_FLAGS "-Wl,-fuse-ld=gold -Wl,--threads") +-endif() +-set(CMAKE_REQUIRED_FLAGS "") +- + option(USE_SSL "Use OpenSSL library for TLS and other crypto functionality" on) + + IF(CMAKE_SYSTEM MATCHES "Darwin") +@@ -132,15 +115,6 @@ + if(CMAKE_BUILD_TYPE MATCHES Debug) + set(USE_LTO_DEFAULT off) + _append(ACNG_COMPFLAGS -DDEBUG) +-else() +- set(CMAKE_REQUIRED_FLAGS "-Wl,--gc-sections") +- CHECK_CXX_COMPILER_FLAG("-Os -fdata-sections -ffunction-sections -Wl,--gc-sections" GC_SECTIONS) +- if(GC_SECTIONS) +- _append(ACNG_COMPFLAGS -fdata-sections -ffunction-sections) +- _append(CMAKE_EXE_LINKER_FLAGS -Wl,--gc-sections) +- _append(CMAKE_SHARED_LINKER_FLAGS -Wl,--gc-sections) +- endif() +- set(CMAKE_REQUIRED_FLAGS "") + endif() + + option(USE_LTO "Enable Link Time Optimization (requires modern compilers)" ${USE_LTO_DEFAULT}) +@@ -385,3 +359,14 @@ + LIBDIR: ${LIBDIR} + AVAHIDIR: ${AVAHIDIR} + ") ++ ++MESSAGE(STATUS "<<< Gentoo configuration >>> ++Build type ${CMAKE_BUILD_TYPE} ++Install path ${CMAKE_INSTALL_PREFIX} ++Compiler flags: ++C ${CMAKE_C_FLAGS} ++C++ ${CMAKE_CXX_FLAGS} ++Linker flags: ++Executable ${CMAKE_EXE_LINKER_FLAGS} ++Module ${CMAKE_MODULE_LINKER_FLAGS} ++Shared ${CMAKE_SHARED_LINKER_FLAGS}\n") diff --git a/net-misc/apt-cacher-ng/files/confd-r1 b/net-misc/apt-cacher-ng/files/confd-r1 new file mode 100644 index 000000000000..84b659bc488b --- /dev/null +++ b/net-misc/apt-cacher-ng/files/confd-r1 @@ -0,0 +1,3 @@ +# Additional options that are passed to the Daemon. +DAEMON_OPTS=" -c /etc/apt-cacher-ng " +LOGDIR="" diff --git a/net-misc/apt-cacher-ng/files/initd b/net-misc/apt-cacher-ng/files/initd deleted file mode 100644 index d054b4de76bd..000000000000 --- a/net-misc/apt-cacher-ng/files/initd +++ /dev/null @@ -1,32 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -NAME="apt-cacher-ng" -DAEMON="/usr/sbin/$NAME" -RUNDIR="/var/run/$NAME" -PIDFILE="$RUNDIR/$NAME.pid" -SOCKETFILE="$RUNDIR/$NAME.socket" -DAEMON_OPTS="$DAEMON_OPTS pidfile=$PIDFILE SocketPath=$SOCKETFILE foreground=0" - -depend() { - use net -} - -start() { - ebegin "Starting $NAME" - checkpath -d -m 0755 -o ${NAME}:${NAME} ${RUNDIR} - start-stop-daemon --start --exec $DAEMON \ - --user $NAME --group $NAME \ - --pidfile $PIDFILE \ - -- $DAEMON_OPTS - eend $? -} - -stop() { - ebegin "Stopping $NAME" - start-stop-daemon --stop --retry 15 --exec $DAEMON \ - --pidfile $PIDFILE - rm -f $PIDFILE - eend $? -} diff --git a/net-misc/apt-cacher-ng/files/initd-r2 b/net-misc/apt-cacher-ng/files/initd-r2 new file mode 100644 index 000000000000..ae9ab7258cc4 --- /dev/null +++ b/net-misc/apt-cacher-ng/files/initd-r2 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +CACHEDIR="var/cache/${RC_SVCNAME}" +DAEMON="/usr/sbin/${RC_SVCNAME}" +RUNDIR="/var/run/${RC_SVCNAME}" +PIDFILE="${RUNDIR}/${RC_SVCNAME}.pid" +SOCKETFILE="${RUNDIR}/${RC_SVCNAME}.socket" +DAEMON_OPTS="${DAEMON_OPTS} pidfile=${PIDFILE} SocketPath=${SOCKETFILE} foreground=0" + +depend() { + use net +} + +start() { + ebegin "Starting ${RC_SVCNAME}" + checkpath -d -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "${RUNDIR}" + checkpath -d -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "${CACHEDIR}" + [ -z "${LOGDIR}" ] && checkpath -d -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "/var/log/${RC_SVCNAME}" + start-stop-daemon --start --exec ${DAEMON} \ + --user ${RC_SVCNAME} --group ${RC_SVCNAME} \ + --pidfile ${PIDFILE} \ + -- ${DAEMON_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + start-stop-daemon --stop --retry 15 --exec ${DAEMON} \ + --pidfile ${PIDFILE} + rm -f ${PIDFILE} + eend $? +} |