inherit eutils DESCRIPTION="A tiny, fast authoritative nameserver that queries LDAP and can be updated instantly" HOMEPAGE="http://www.nimh.org/code/ldapdns/" SRC_URI="http://www.nimh.org/dl/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~ppc x86" IUSE="" DEPEND="virtual/libc >=net-nds/openldap-2" RDEPEND="${DEPEND} sys-apps/ucspi-tcp" pkg_setup() { enewgroup nofiles enewuser ldapdns -1 -1 /nonexistent nofiles } src_unpack() { unpack ${A}; cd ${S} epatch ${FILESDIR}/${P}-gentoo.patch sed -i -e 's:UID:LDAPDNSUID:' engine.c sed -i -e 's:GID:LDAPDNSGID:' engine.c } src_compile() { local myconf="--prefix=/usr " cd ${S} ./configure ${myconf} emake || die } src_install() { einstall || die dodoc AUTHORS CHANGELOG FAQ INSTALL COPYING NEWS README* TODO newinitd "${FILESDIR}"/ldapdns.rc ldapdns newconfd "${FILESDIR}"/ldapdns.confd ldapdns dodir /var/lib/ldapdns fowners -R ldapdns:nofiles /var/lib/ldapdns fperms 700 /var/lib/ldapdns } pkg_postinst() { elog "Please configure /etc/conf.d/ldapdns." elog "Please set your ldap password in /var/lib/ldapdns/password." elog "Run \"chmod 400 /var/lib/ldapdns/password\" after that." }