summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/apt-cacher-ng/ChangeLog8
-rw-r--r--net-misc/apt-cacher-ng/Manifest10
-rw-r--r--net-misc/apt-cacher-ng/apt-cacher-ng-0.3.8.1-r1.ebuild104
-rw-r--r--net-misc/apt-cacher-ng/files/apt-cacher-ng-0.3.8-respect-portage-qa-build-unstripped.patch36
-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/logrotate15
-rw-r--r--net-misc/apt-cacher-ng/metadata.xml9
9 files changed, 231 insertions, 0 deletions
diff --git a/net-misc/apt-cacher-ng/ChangeLog b/net-misc/apt-cacher-ng/ChangeLog
new file mode 100644
index 000000000..cf5b90389
--- /dev/null
+++ b/net-misc/apt-cacher-ng/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for net-misc/apt-cacher-ng
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*apt-cacher-ng-0.3.8.1-r1 (12 Apr 2009)
+
+ 12 Apr 2009; Sergey Dryabzhinsky <sergey.dryabzhinsky@gmail.com> +apt-cacher-ng-0.3.8.1-r1.ebuild:
+ Version bump.
diff --git a/net-misc/apt-cacher-ng/Manifest b/net-misc/apt-cacher-ng/Manifest
new file mode 100644
index 000000000..ea2df34ae
--- /dev/null
+++ b/net-misc/apt-cacher-ng/Manifest
@@ -0,0 +1,10 @@
+AUX apt-cacher-ng-0.3.8-respect-portage-qa-build-unstripped.patch 1238 RMD160 fd6976f7643791b69b0e0efc731a055dc7dfebf7 SHA1 2febf9c4e02d40e60e75b9d6a6f624437718866c SHA256 5545297001efeb24a348099c13fbd6766b255e9ee8649897d18156d77e64a0b1
+AUX confd 90 RMD160 d29e3c43d1b7856a5ac6a2e47249955b4aa0e467 SHA1 e60450e1261082df039aad6fe8367e22ee1846c6 SHA256 cabcc9da711514913e5136c82842c750bab8a9658aeeb88da5a266e0d69b29a1
+AUX cron.daily 459 RMD160 774e42915dc408831f088b87f8f5de9b15423e44 SHA1 09bae26f2752cb12d4f7fa9eff492b3bb24a360e SHA256 6ec7ceeead17ef5a84d5ec5472d38810d9e1478213643da5f3fd9863dde40094
+AUX initd 785 RMD160 56dd07e923ef664e8fd192d6a153f2b922ee4835 SHA1 eef235be0317bb95a03fdf22136c793847139ef9 SHA256 0fe59cd17b7a4b7afc68e27f776c7c1b2b83b6bf3c461725eca7a732538f893b
+AUX logrotate 377 RMD160 ef3824ff3484b00195fad7153332ce33f702d937 SHA1 d5606fceb5f3296aff7a7111ffadb440761286f2 SHA256 6f1624d655383452a6d56d69327d41b80379cc667ad2d481ca94f8ea78f7a65b
+DIST apt-cacher-ng_0.3.8-1.diff.gz 10747 RMD160 1b1accdc721d79cf5dd28a57c27bee4c0ba09cee SHA1 cd828d0d66d260974bd93e093db5f308f7a575cd SHA256 b950bfe11e9038c61828896284d47a6b2d11b04dfa01ff847ba08e57b647967b
+DIST apt-cacher-ng_0.3.8.orig.tar.gz 211989 RMD160 e4b29385b59813104d1a79e5dca3ebd526934626 SHA1 830c5bb3164e381eaee5de7c364005f2923cdff2 SHA256 76a5314f3191aeae3fabf7730e8fcf509e93a8c2d609dd2b3b2f8bc312eee26b
+EBUILD apt-cacher-ng-0.3.8.1-r1.ebuild 3165 RMD160 f37603647610ed85b74c8e6abb6b1adac3f946fc SHA1 a495f39f998a78c223b58bc5c16b108139f5a30b SHA256 b03769e7d62ec490fcdb5bcb365b43bb0764bb8a6e51b06f2e4bb29895df8ad2
+MISC ChangeLog 281 RMD160 0e6ec04b80ef107338ade0ca8bcb14891455c923 SHA1 54565fa703e437e5ce8a4412854cba729b044c86 SHA256 003a117587ef15f5cebfea88b6b6e41c4d97a7d5b7dd67d34d73b127cd92a438
+MISC metadata.xml 390 RMD160 40659c355f410c97959c1cc60b8aa8e4e00950dd SHA1 176a70493d5c09c2e0e10db57b6f2305ffeeb5e9 SHA256 cfa296bbf435f33a61f87b507401841d70dfdf000623861b534f3d35490a81cf
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-0.3.8.1-r1.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-0.3.8.1-r1.ebuild
new file mode 100644
index 000000000..ce4010cb1
--- /dev/null
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-0.3.8.1-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+MY_PV=${PV%.*}
+MY_DPV=${PV#*.*.*.}
+
+DESCRIPTION="Apt-Cacher NG is yet another implementation of a HTTP proxy for Debian/Ubuntu software packages written in C++"
+HOMEPAGE="http://www.unix-ag.uni-kl.de/~bloch/acng/"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/a/${PN}/${PN}_${MY_PV}-${MY_DPV}.diff.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="doc fuse"
+
+DEPEND="app-arch/bzip2
+ sys-libs/zlib"
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ fuse? ( sys-fs/fuse )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+pkg_setup() {
+ # add new user & group for daemon
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_unpack() {
+ unpack ${A}
+ epatch "${WORKDIR}/${PN}_${MY_PV}-${MY_DPV}.diff" # Debian patchset number 1.2.3.x
+ epatch "${FILESDIR}/${PN}-${MY_PV}-respect-portage-qa-build-unstripped.patch" # Respect portage
+}
+
+src_compile() {
+ local build="acng"
+ use fuse && build="${build} acngfs"
+ emake CURDIR="${S}" ${build} || die "make '${build}' failed!"
+}
+
+src_install() {
+ # There is no any install target :(
+ # So we do all stuff here
+
+ dosbin apt-cacher-ng || die "Can't install apt-cacher-ng"
+ if use fuse; then dobin acngfs || die "Can't install acngfs"; fi
+
+ newinitd "${FILESDIR}"/initd ${PN} || die "Can't add new init.d ${PN}"
+ newconfd "${FILESDIR}"/confd ${PN} || die "Can't add new conf.d ${PN}"
+
+ # for logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/logrotate ${PN} || die "Can't install new file ${PN} into '/etc/logrotate.d'"
+
+ doman doc/man/${PN}* || die "Can't install mans"
+ if use fuse; then doman doc/man/acngfs* || die "Can't install man pages for fusefs"; fi
+
+ # Documentation
+ dodoc README TODO VERSION INSTALL ChangeLog || die "Can't install common docs"
+ if use doc; then
+ dodoc doc/*.pdf || die "Can't install docs"
+ dohtml doc/html/* || die "Can't install html docs"
+ docinto examples/conf
+ dodoc conf/* || die "Can't install config examples"
+ fi
+
+ # perl daily cron script
+ dosbin expire-caller.pl || die "Can't install cache cleaner perl script"
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/cron.daily ${PN} || die "Can't install new daily cron script"
+
+ # default configuration
+ insinto /etc/${PN}
+ newins conf/acng.conf ${PN}.conf || die "Can't install ${PN} configuration file"
+ newins conf/report.html acng-report.html || die "Can't install ${PN} report page"
+
+ # Some directories must exists
+ keepdir /var/log/${PN}
+ keepdir /var/run/${PN}
+ fowners ${PN}:${PN} \
+ /etc/${PN} \
+ /etc/${PN}/${PN}.conf \
+ /etc/${PN}/acng-report.html \
+ /var/log/${PN} \
+ /var/run/${PN} || die "Can't change owners"
+}
+
+pkg_postinst() {
+ elog "Do not forget about edit configuration file and read manuals!"
+ elog " Default file : /etc/${PN}/${PN}.conf"
+ elog " Manual page : man 8 apt-cache-ng"
+ elog " Documentation: /usr/share/doc/${PF}"
+ if use fuse; then
+ elog "You have choose to build fuse httpfs named 'acngfs'."
+ elog "It's can be used to mount apt cache on server to client"
+ elog "filesystem."
+ elog " Manual page : man 8 acngfs"
+ fi
+}
diff --git a/net-misc/apt-cacher-ng/files/apt-cacher-ng-0.3.8-respect-portage-qa-build-unstripped.patch b/net-misc/apt-cacher-ng/files/apt-cacher-ng-0.3.8-respect-portage-qa-build-unstripped.patch
new file mode 100644
index 000000000..2502fd92b
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/apt-cacher-ng-0.3.8-respect-portage-qa-build-unstripped.patch
@@ -0,0 +1,36 @@
+diff -urNd apt-cacher-ng-0.3.8.orig/Makefile apt-cacher-ng-0.3.8/Makefile
+--- apt-cacher-ng-0.3.8.orig/Makefile 2009-04-11 13:25:45.000000000 +0400
++++ apt-cacher-ng-0.3.8/Makefile 2009-04-11 13:27:53.000000000 +0400
+@@ -47,12 +47,12 @@
+ # small build, even replacing libstdc++ with supc++ and gcc linking
+ in.acng: $(OBJSIN)
+ $(CC) -o $@ $(OBJSIN) -lsupc++ -Wl,--as-needed
+- strip $@
++# strip $@
+
+ apt-cacher-ng: $(OBJS)
+ $(CXX) -o $@ $(OBJS) -lpthread $(LDFLAGS) -lz -lbz2
+ @-test -d ../unstripped && cp $@ ../unstripped/$@.$$(dpkg-parsechangelog |grep ^Version: | cut -f2 -d' ') || true
+- strip $@
++# strip $@
+
+ else
+
+@@ -60,7 +60,7 @@
+
+ in.acng: $(OBJSIN) $(OBJS)
+ $(CXX) -o $@ acbuf.o client.o acfg.o filereader.o meta.o md5.o sha1.o aclogger.o -lz -lbz2 -Wl,--as-needed
+- strip $@
++# strip $@
+
+ apt-cacher-ng: $(OBJS)
+ $(CXX) -o $@ $(OBJS) -lpthread $(LDFLAGS) -lz -lbz2
+@@ -69,7 +69,7 @@
+ acngfs: $(OBJSFS)
+ $(CXX) -o acngfs $(OBJSFS) -Wl,--as-needed `pkg-config fuse --libs`
+ @-test -d ../unstripped && cp $@ ../unstripped/$@.$$(dpkg-parsechangelog |grep ^Version: | cut -f2 -d' ') || true
+- strip $@
++# strip $@
+
+ doc: doc/src/README.but doc/src/manpage.but doc/src/acngfs.but
+ mkdir -p doc/.build doc/html doc/man
diff --git a/net-misc/apt-cacher-ng/files/confd b/net-misc/apt-cacher-ng/files/confd
new file mode 100644
index 000000000..72e76de13
--- /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 000000000..b5ea14367
--- /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 000000000..3097a69e2
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/files/rsyncd.init.d,v 1.5 2007/02/23 11:33:59 uberlord Exp $
+
+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"
+ start-stop-daemon --start --exec $DAEMON \
+ --chuid $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/logrotate b/net-misc/apt-cacher-ng/files/logrotate
new file mode 100644
index 000000000..330f2b6b6
--- /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 000000000..3e8fbca7f
--- /dev/null
+++ b/net-misc/apt-cacher-ng/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>maintainer-wanted</herd>
+ <use>
+ <flag name="fuse">Build fuse httpfs named 'acngfs'. It's can be used to mount apt cache on server to client filesystem.</flag>
+ <flag name="doc">Installs some documentation and config examples.</flag>
+ </use>
+</pkgmetadata>