# $Header$ inherit flag-o-matic eutils DESCRIPTION="true meditative peace for the usenet administrator" HOMEPAGE="http://www.nntpcache.com/" SRC_URI="http://www.nntpcache.com/pub/nntpcache/${P}.tar.gz" LICENSE="nntpcache" SLOT="0" KEYWORDS="amd64 x86" IUSE="ldap radius debug dmalloc profile static stealth" # configure falls back to news:news if this is commented out # # pkg_setup() { # if ! id nntpcache >/dev/null; then # enewgroup nntpcache # enewuser nntpcache -1 -1 -1 nntpcache # fi # } # notice: simply calling this function 'patch' prevents epatch working dopatch() { FILES=`grep -ir "\\$($1)" * | grep -v "\\$(DESTDIR)\\$($1)" | cut -d : -f 1 | uniq | egrep "$2"` for FILE in ${FILES} ; do mv ${FILE} ${FILE}.old ebegin "Patching '$1' in ${FILE}" cat ${FILE}.old | sed -r s/\([^\(\\\$\\\(DESTDIR\\\)\)]\)\\\$\\\($1\\\)/\\1\\\$\\\(DESTDIR\\\)\\\$\\\($1\\\)/g >${FILE} rm ${FILE}.old eend ${?} done } src_unpack() { unpack ${P}.tar.gz cd "${S}" epatch "${FILESDIR}"/${P}-argfix.patch epatch "${FILESDIR}"/${P}-srvauth.patch use stealth && epatch "${FILESDIR}"/${P}-post.patch dopatch "sysconfdir" "\.in|\.am" dopatch "libexecdir" "\.in|\.am" dopatch "localstatedir" "\.in|\.am" } src_compile() { econf || die "econf failed" # warning: deactivated because the configure script misbehaves the --without-* switches # $(use_with ldap) \ # $(use_with radius) \ # $(use_enable debug) \ # $(use_with debug) \ # $(use_with dmalloc) \ # $(use_with profile profiling) \ # $(use_with !debug optimise) \ # $(use_with static) \ emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "install failed" dodoc FAQ NEWS README README.INN README.pam HACKING dohtml FAQ.html exeinto /etc/init.d; newexe ${FILESDIR}/${PN}.initd ${PN} }