commit:     378e41bb9938c568686eb4024368ecb0cd65e045
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 25 07:16:24 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Mar 25 07:16:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=378e41bb

net-misc/apt-cacher-ng: Version bump.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-misc/apt-cacher-ng/Manifest               |   1 +
 net-misc/apt-cacher-ng/apt-cacher-ng-3.ebuild | 117 ++++++++++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/net-misc/apt-cacher-ng/Manifest b/net-misc/apt-cacher-ng/Manifest
index dbea216f78b..03150f73753 100644
--- a/net-misc/apt-cacher-ng/Manifest
+++ b/net-misc/apt-cacher-ng/Manifest
@@ -1 +1,2 @@
 DIST apt-cacher-ng_2.orig.tar.xz 313360 SHA256 
eeab24d96ceb544b4c57dd1ac749af9e2ad92dbf864056688bd9c62d02186c2e SHA512 
ad409b4ffc39af4037be003c8f73048e191bfed36e3d63dcb061fdc456b3d18c3e0ec82d8af5f9272c3e33564ec3060a567733e123c892841cbb8bc7d557fd1b
 WHIRLPOOL 
44940dd3b494d395dae18c93d4553775d9df487c7c5b4c2f8a643df91a4e30fe5d1724f9d54b3ff74f189ea877d35a7974076fd0260ce0f5ebe6291572e93805
+DIST apt-cacher-ng_3.orig.tar.xz 319996 SHA256 
e5b435007ec13fafcebeef65a3a8ec4210853e339efeb98ea79d1a3557f63611 SHA512 
4eb520d724c1397b9deefe8dc1b0af81f2151e50d1cabfc2480f040233ae1ee95434d0dcf2b4db8aec918204ae676a49e19e3c885674c7fb389972c2da64c3d4
 WHIRLPOOL 
261ae398d476498d74b22af91bf9e824b5b51f597eb010677d962e2f8a6327d9c0b3fa71211d293e6d98c8b11dcdb1edae91c97618679cfb185c87a2c63f5982

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 00000000000..dbddf2c0685
--- /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="
+       http://www.unix-ag.uni-kl.de/~bloch/acng/
+       http://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}
+}

Reply via email to