summaryrefslogtreecommitdiff
path: root/net-misc/apt-cacher-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/apt-cacher-ng
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/apt-cacher-ng')
-rw-r--r--net-misc/apt-cacher-ng/Manifest10
-rw-r--r--net-misc/apt-cacher-ng/apt-cacher-ng-3.ebuild117
-rw-r--r--net-misc/apt-cacher-ng/files/confd2
-rw-r--r--net-misc/apt-cacher-ng/files/cron.daily15
-rw-r--r--net-misc/apt-cacher-ng/files/initd32
-rw-r--r--net-misc/apt-cacher-ng/files/initd-r133
-rw-r--r--net-misc/apt-cacher-ng/files/logrotate15
-rw-r--r--net-misc/apt-cacher-ng/metadata.xml15
8 files changed, 239 insertions, 0 deletions
diff --git a/net-misc/apt-cacher-ng/Manifest b/net-misc/apt-cacher-ng/Manifest
new file mode 100644
index 000000000000..434f16d3f66e
--- /dev/null
+++ b/net-misc/apt-cacher-ng/Manifest
@@ -0,0 +1,10 @@
+AUX confd 90 SHA256 cabcc9da711514913e5136c82842c750bab8a9658aeeb88da5a266e0d69b29a1 SHA512 14412f717ad334e6ce5cf65b9b0968fc3ab27e93f3d3ce52d39e0b646694e8e7d7905ede25feeabad6ef3301b5644677f30e27b867ff32f665ab6c4e2cd0a662 WHIRLPOOL b6e2a87ef590b806a128bc7198b2d278fede6bdd6b5326f3dd1bcbda193e8c56248a997e01e624e4c7468b9f459c8d18fc3c9631263dd560ff0601bf5dde3598
+AUX cron.daily 459 SHA256 6ec7ceeead17ef5a84d5ec5472d38810d9e1478213643da5f3fd9863dde40094 SHA512 3e42afb0be6235594e2ccf68d0fd4c7be4954d6583562e1692e98ab55e8fdc74026690b01417e4b6fc9fe288df40e66e5e63e5a1fd98d5484c6eb366aa1b4d4a WHIRLPOOL e9c69a8d21a38435522f02fd7ac4b2924ad641e2058a9bc3ae051f155eee500e33d116cf868328a665d082c616c42ba3e5de751437ba24eef193541975e792db
+AUX initd 725 SHA256 68038952d9c31889adb3716f9b54725d2f0cbd9872b2e4b0ed94e5018ab92858 SHA512 de8dbff432540d3b725556bb9189e14cf06afc876ec636a9ae2a00ee6158f791a9306c2630cfbf11de80b81ffadb45f39bae235c5d9ee76b5245c0599a387b0a WHIRLPOOL 36bd21736879f143f1657f92c78a9ed202c74962ce86f8736797f6e40f5d92ea273d55c23ab850a655e45b25fba52c39655372123314a79faf327bfb97020314
+AUX initd-r1 906 SHA256 161f65213c87f5baf594c390e81194969c5724b0555e6ef58ac42ac6ed23b77f SHA512 c4aa04ea30734f00c617684ea014c632bf0d43580ae7b7c6e9ae58e2c947d15177f93e7b92fd9f7b79d1898d0c6a386de1da7fa038dace6381cd72907845e57c WHIRLPOOL 8e791c5c3b23f0b1c75fb8be26ea4d3644315860e22f53770ded7d35af41c92288ce9ccf7367ba67c2fc8d4e776ac65b9b950f28b2b3b820fdc7b0b4ec8a851e
+AUX logrotate 377 SHA256 6f1624d655383452a6d56d69327d41b80379cc667ad2d481ca94f8ea78f7a65b SHA512 c2f4be7294953a63a89e5beee40029e03faa1db49986a6f8d974def67b064d391be13ecddec0d6b4d7ec369db6dcd0bafc328e90b54ccec911df739c719fd885 WHIRLPOOL 80037bc359ffb860ce19e2493d10597f81e02138368ad2bce002da8f4a725cdeee61662478efff4755f0f8a0c9f376263fd6b56505eddddd5c18c1a33f7d22b8
+DIST apt-cacher-ng_3.orig.tar.xz 319996 SHA256 e5b435007ec13fafcebeef65a3a8ec4210853e339efeb98ea79d1a3557f63611 SHA512 4eb520d724c1397b9deefe8dc1b0af81f2151e50d1cabfc2480f040233ae1ee95434d0dcf2b4db8aec918204ae676a49e19e3c885674c7fb389972c2da64c3d4 WHIRLPOOL 261ae398d476498d74b22af91bf9e824b5b51f597eb010677d962e2f8a6327d9c0b3fa71211d293e6d98c8b11dcdb1edae91c97618679cfb185c87a2c63f5982
+EBUILD apt-cacher-ng-3.ebuild 2490 SHA256 2f844ac94e62b9a4bd5a7db5df1298a62d75d18ccf642071dbb079d9c9d792b6 SHA512 1b40a054f5a67e5ae802570a191691fa97d8fa275d11789a210b2d9c8e6c6c625fdcb46d6aa09736ede0c0133e77b873a033d18a414cc79c99152656c28573f6 WHIRLPOOL 28dbe09b4984b57825ca53d8073e6d657b6c9bfa3718259da822aca1f3d795a7cf5c4ae71be6c623bf38d04568010dfa0f68796df2d5e8d2ee443eece5066814
+MISC ChangeLog 6829 SHA256 4fb15eb419baf69aeaa3edaff5d71137d2aeb1db33d8ffe8cf4810a4e07c0baa SHA512 1b830ebb48b2d0d1affe4aca7054da4288f33c01af0d6744191c2b01cc7205f0b2ae86e5e34e5da5b4bbc9cef5f467cb4f4812810adf2b7c2ea3cefe62969eb0 WHIRLPOOL b811e766109df1b92766c4b2a9af25157e6f1446b0eca45a2dc65c1da89d62c1d75564221071edc594337993f3bd6be3a44d7f68612ed36391d6de67b2719546
+MISC ChangeLog-2015 9341 SHA256 c10b997bb9e9411ec5df0198de9378a0864e37b68c07f51e227ea0e8e41a981e SHA512 5cb7c0b12a2831793269495da72eef8527863468f3351e76ad035ba17c4b8c3912c169d044e4f226183953611fd691d3254c58000b0db1cc90db8dbf9b44ef04 WHIRLPOOL 909700ebb5d0a465fc12984a5cb73f72ff8bf3eb0e8d99598a203da32e5357f79d4040c9b9e2921a11c380d09a42775a018c02bb257bbbad0f6cff94e02b3226
+MISC metadata.xml 493 SHA256 8d3bd73dbbd84f8b52225d902d6e90f3202e3c217aa19d099217a20d3da237a7 SHA512 58f1345b841c7d5105432d0dab345033b9cefcfd4dedfe05f52d25135716be336a2f4a5fee3288236239bae9bbb1381deff0917fff8c80d81caaf64e8706b5a6 WHIRLPOOL 4dc7dda8b2cab7b62049a4ee12a83b699e3689bcb1c77f112192124688f492e719c0ed7b4b217cda3ab37177c7d854b8b64d1683737b48b4789a27d0ebe3b802
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-3.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-3.ebuild
new file mode 100644
index 000000000000..092180f5b76f
--- /dev/null
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-3.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit cmake-utils eutils 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"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fuse systemd tcpd"
+
+COMMON_DEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ dev-libs/openssl:*
+ sys-libs/zlib
+ systemd? (
+ sys-apps/systemd
+ )
+"
+DEPEND="
+ ${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 )
+"
+
+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
+}
+
+src_install() {
+ pushd ${CMAKE_BUILD_DIR}
+ dosbin ${PN}
+ if use fuse; then
+ dobin acngfs
+ fi
+ popd
+
+ newinitd "${FILESDIR}"/initd-r1 ${PN}
+ newconfd "${FILESDIR}"/confd ${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
+ dohtml doc/html/*
+ 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 "${CMAKE_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/files/confd b/net-misc/apt-cacher-ng/files/confd
new file mode 100644
index 000000000000..72e76de133d1
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/confd
@@ -0,0 +1,2 @@
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=" -c /etc/apt-cacher-ng "
diff --git a/net-misc/apt-cacher-ng/files/cron.daily b/net-misc/apt-cacher-ng/files/cron.daily
new file mode 100644
index 000000000000..b5ea1436709c
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/cron.daily
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Run the expire function of apt-cacher-ng non-interactively (unless errors
+# are detected).
+
+# optional, specify hostname to appear in error messages and links
+# HOSTNAME=externallyVisibleHostName
+# export HOSTNAME
+
+# optional, specify IP address to connect to
+# ACNGIP=10.0.1.3
+# export ACNGIP
+
+if test -r /usr/sbin/expire-caller.pl ; then
+ perl /usr/sbin/expire-caller.pl || echo Check error messages in /var/log/apt-cacher-ng/maint_*.log
+fi
diff --git a/net-misc/apt-cacher-ng/files/initd b/net-misc/apt-cacher-ng/files/initd
new file mode 100644
index 000000000000..d054b4de76bd
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd
@@ -0,0 +1,32 @@
+#!/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-r1 b/net-misc/apt-cacher-ng/files/initd-r1
new file mode 100644
index 000000000000..2e401dcd25a0
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd-r1
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON="/usr/sbin/${RC_SVCNAME}"
+RUNDIR="/var/run/${RC_SVCNAME}"
+CACHEDIR="var/cache/${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}"
+ 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 $?
+}
diff --git a/net-misc/apt-cacher-ng/files/logrotate b/net-misc/apt-cacher-ng/files/logrotate
new file mode 100644
index 000000000000..330f2b6b6616
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/logrotate
@@ -0,0 +1,15 @@
+/var/log/apt-cacher-ng/*.log {
+ size 10M
+ missingok
+ rotate 12
+ compress
+ delaycompress
+ notifempty
+ create
+ postrotate
+ if [ -s /var/run/apt-cacher-ng/apt-cacher-ng.pid ] ; then
+ kill -s USR1 "$(cat /var/run/apt-cacher-ng/apt-cacher-ng.pid)"
+ fi
+ endscript
+}
+
diff --git a/net-misc/apt-cacher-ng/metadata.xml b/net-misc/apt-cacher-ng/metadata.xml
new file mode 100644
index 000000000000..88aef1304357
--- /dev/null
+++ b/net-misc/apt-cacher-ng/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>jer@gentoo.org</email>
+<name>Jeroen Roovers</name>
+</maintainer>
+<maintainer type="project">
+<email>deb-tools@gentoo.org</email>
+<name>Gentoo Debian Tools Project</name>
+</maintainer>
+<use>
+<flag name="fuse">Install the <pkg>sys-fs/fuse</pkg> based acngfs, to use a userspace filesystem for the apt cache.</flag>
+</use>
+</pkgmetadata>