# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Policy daemon for postfix and other MTAs" HOMEPAGE="http://policyd.sf.net/" SRC_URI="http://policyd.sourceforge.net/${PN}-v${PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="dev-db/mysql dev-libs/openssl" S=${WORKDIR}/${PN}-v${PV} src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${PN}-cflags.patch" } src_compile() { sed -i -e s/UID=0/UID=65534/ -e s/GID=0/GID=65534/ -e s/DAEMON=0/DAEMON=1/ -e s/DEBUG=3/DEBUG=0/ -e s/DATABASE_KEEPALIVE=0/DATABASE_KEEPALIVE=1/ policyd.conf emake build || "emake build failed" } src_install() { insopts -o root -g nobody -m 0750 dosbin policyd cleanup stats insopts -o root -g nobody -m 0640 insinto /etc doins policyd.conf insopts -o root -g nobody -m 0700 exeinto /etc/cron.hourly newexe ${FILESDIR}/${PN}-cleanup.cron ${PN}-cleanup.cron dodoc Changelog.txt DATABASE.mysql License.txt README.txt doc/support.txt newinitd ${FILESDIR}/${PN}.rc ${PN} newconfd ${FILESDIR}/${PN}.confd ${PN} } pkg_postinst() { elog "To use policyd with postfix, update your /etc/postfix/main.cf file by adding" elog " check_policy_service inet:127.0.0.1:10031" elog "to your smtpd_recipient restrictions line, or similar." elog elog "Also remember to start the daemon at boot:" elog " rc-update add policyd default" elog elog "Read the documentation for more info." }