diff options
author | Jeroen Roovers <jer@gentoo.org> | 2011-05-24 21:48:33 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2011-05-24 21:48:33 +0000 |
commit | a0757bf63c6a33e274270ab74d6e5863e6443f2d (patch) | |
tree | 3e71018fba2783fe86e120909e548b8ca2471299 /net-misc | |
parent | Adjust curl dependency (diff) | |
download | gentoo-2-a0757bf63c6a33e274270ab74d6e5863e6443f2d.tar.gz gentoo-2-a0757bf63c6a33e274270ab74d6e5863e6443f2d.tar.bz2 gentoo-2-a0757bf63c6a33e274270ab74d6e5863e6443f2d.zip |
Initial commit (bug #265840).
(Portage version: 2.2.0_alpha35/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/apt-cacher-ng/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild | 105 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/confd | 2 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/cron.daily | 15 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/initd | 32 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/files/logrotate | 15 | ||||
-rw-r--r-- | net-misc/apt-cacher-ng/metadata.xml | 15 |
7 files changed, 195 insertions, 0 deletions
diff --git a/net-misc/apt-cacher-ng/ChangeLog b/net-misc/apt-cacher-ng/ChangeLog new file mode 100644 index 000000000000..06da8d7f9d4f --- /dev/null +++ b/net-misc/apt-cacher-ng/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for net-misc/apt-cacher-ng +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/apt-cacher-ng/ChangeLog,v 1.1 2011/05/24 21:48:33 jer Exp $ + +*apt-cacher-ng-0.6.2 (24 May 2011) + + 24 May 2011; Jeroen Roovers <jer@gentoo.org> +apt-cacher-ng-0.6.2.ebuild, + +files/confd, +files/cron.daily, +files/initd, +files/logrotate, + +metadata.xml: + Initial commit (bug #265840). + diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild new file mode 100644 index 000000000000..92f460008d1d --- /dev/null +++ b/net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/apt-cacher-ng/apt-cacher-ng-0.6.2.ebuild,v 1.1 2011/05/24 21:48:33 jer Exp $ + +EAPI="3" + +inherit eutils cmake-utils + +DESCRIPTION="Yet another implementation of an HTTP proxy for Debian/Ubuntu software packages written in C++" +HOMEPAGE="http://www.unix-ag.uni-kl.de/~bloch/acng/" +LICENSE="as-is" +SLOT="0" +SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.gz" + +KEYWORDS="~amd64 ~x86" +IUSE="doc fuse" + +COMMON_DEPEND=" + app-arch/bzip2 + sys-libs/zlib +" +DEPEND=" + ${COMMON_DEPEND} + dev-util/cmake +" +RDEPEND=" + ${COMMON_DEPEND} + dev-lang/perl + fuse? ( sys-fs/fuse ) +" + +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_26=yes ${mycmakeargs}" + else + mycmakeargs="-DHAVE_FUSE_26=no ${mycmakeargs}" + fi + + cmake-utils_src_configure +} + +src_install() { + pushd ${CMAKE_BUILD_DIR} + dosbin ${PN} || die + if use fuse + then dobin acngfs || die + fi + popd + + newinitd "${FILESDIR}"/initd ${PN} || die "Can't add new init.d ${PN}" + newconfd "${FILESDIR}"/confd ${PN} || die "Can't add new conf.d ${PN}" + + 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 + exeinto /etc/cron.daily + newexe "${FILESDIR}"/cron.daily ${PN} || die + + # default configuration + insinto /etc/${PN} + newins conf/acng.conf ${PN}.conf || die + newins conf/report.html report.html || die + newins conf/deb_mirrors.gz deb_mirrors.gz || die + newins conf/debvol_mirrors.gz debvol_mirrors.gz || die + newins conf/ubuntu_mirrors ubuntu_mirrors || die + newins conf/archlx_mirrors archlx_mirrors || die + newins conf/sfnet_mirrors sfnet_mirrors || die + newins conf/cygwin_mirrors cygwin_mirrors || die + newins conf/security.conf security.conf || die + newins conf/maint.html maint.html || die + newins conf/userinfo.html userinfo.html || die + newins conf/style.css style.css || die + + dodir /var/cache/${PN} || die + dodir /var/log/${PN} || die + # Some directories must exists + keepdir /var/log/${PN} + keepdir /var/run/${PN} + fowners -R ${PN}:${PN} \ + /etc/${PN} \ + /var/log/${PN} \ + /var/cache/${PN} \ + /var/run/${PN} || die +} 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..c7df24365095 --- /dev/null +++ b/net-misc/apt-cacher-ng/files/initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/apt-cacher-ng/files/initd,v 1.1 2011/05/24 21:48:33 jer 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 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..4e3da3eecd45 --- /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> +<herd>deb-tools</herd> +<maintainer> +<email>jer@gentoo.org</email> +<name>Jeroen Roovers</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> |