# $Header$ inherit eutils flag-o-matic 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" #pkg_setup() { # # configure searches for this user # if ! id nntpcache >/dev/null; then # enewgroup nntpcache # enewuser nntpcache -1 -1 -1 nntpcache # fi #} patch() { FILES=`grep -ir "\\$($1)" * | grep -v "\\$(DESTDIR)\\$($1)" | cut -d : -f 1 | uniq | egrep "$2"` for FILE in ${FILES} ; do mv ${FILE} ${FILE}.old einfo "Patching '$1' in ${FILE}" cat ${FILE}.old | sed -r s/\([^\(\\\$\\\(DESTDIR\\\)\)]\)\\\$\\\($1\\\)/\\1\\\$\\\(DESTDIR\\\)\\\$\\\($1\\\)/g >${FILE} rm ${FILE}.old done } src_unpack() { unpack ${P}.tar.gz cd "${S}" patch "sysconfdir" "\.in|\.am" patch "libexecdir" "\.in|\.am" patch "localstatedir" "\.in|\.am" } src_compile() { econf --enable-debug --with-debug || die "econf failed" # WARNING: 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} }