1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake-utils eutils
8 DESCRIPTION="Yet another implementation of a HTTP proxy for Debian/Ubuntu software packages written in C++"
9 HOMEPAGE="http://www.unix-ag.uni-kl.de/~bloch/acng/"
10 SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.tar.gz"
15 IUSE="doc examples fuse lzma"
17 DEPEND="app-arch/bzip2
20 || ( app-arch/xz-utils
25 fuse? ( sys-fs/fuse )"
28 # Add a new user & group for the daemon.
30 enewuser ${PN} -1 -1 -1 ${PN}
35 # avoid forcing in LDFLAGS
36 -DHAVE_WL_AS_NEEDED=OFF
37 # assert for possible boost automagic
38 -DHAVE_BOOST_SMARTPTR=OFF
40 $(cmake-utils_use_has lzma LZMA)
41 $(cmake-utils_use_has fuse FUSE_26)
44 cmake-utils_src_configure
48 dosbin "${CMAKE_BUILD_DIR}"/${PN} || die
49 doman doc/man/${PN}.8 || die
51 dobin "${CMAKE_BUILD_DIR}"/acngfs || die
52 doman doc/man/acngfs.8 || die
55 newinitd "${FILESDIR}"/initd ${PN} || die
56 newconfd "${FILESDIR}"/confd ${PN} || die
59 insinto /etc/logrotate.d
60 newins "${FILESDIR}"/logrotate ${PN} || die
63 dodoc ChangeLog doc/README TODO || die
65 dodoc doc/*.pdf || die
66 dohtml doc/html/* || die
74 # perl daily cron script
75 dosbin expire-caller.pl || die
76 exeinto /etc/cron.daily
77 newexe "${FILESDIR}"/cron.daily ${PN} || die
79 # default configuration
81 newins conf/acng.conf ${PN}.conf || die
82 newins conf/report.html acng-report.html || die
84 # Some directories must exist
85 keepdir /var/log/${PN}
86 keepdir /var/run/${PN}
90 /etc/${PN}/${PN}.conf \
91 /etc/${PN}/acng-report.html \
97 elog "Do not forget about edit configuration file and read manuals!"
98 elog " Default file : /etc/${PN}/${PN}.conf"
99 elog " Manual page : man 8 apt-cache-ng"
100 elog " Documentation: /usr/share/doc/${PF}"
102 elog "You have choose to build fuse httpfs named 'acngfs'."
103 elog "It's can be used to mount apt cache on server to client"
105 elog " Manual page : man 8 acngfs"
107 elog "Please note: this ebuild installs /etc/cron.daily/${PN} cron job."