You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.9 KiB
83 lines
1.9 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
9 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
9 years ago
|
|
||
4 years ago
|
inherit flag-o-matic toolchain-funcs
|
||
9 years ago
|
|
||
|
DESCRIPTION="Policy daemon for postfix and other MTAs"
|
||
|
HOMEPAGE="http://policyd.sf.net/"
|
||
|
SRC_URI="http://policyd.sourceforge.net/${P}.tar.gz"
|
||
4 years ago
|
|
||
9 years ago
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
5 years ago
|
KEYWORDS="amd64 ~hppa x86"
|
||
4 years ago
|
|
||
|
DEPEND="
|
||
|
dev-db/mysql-connector-c:0=
|
||
|
dev-libs/openssl:0="
|
||
9 years ago
|
RDEPEND="${DEPEND}"
|
||
|
|
||
6 years ago
|
PATCHES=(
|
||
4 years ago
|
"${FILESDIR}"/${PN}-post182.patch
|
||
|
"${FILESDIR}"/${PN}-makefile.patch
|
||
6 years ago
|
)
|
||
|
|
||
9 years ago
|
src_prepare() {
|
||
6 years ago
|
default
|
||
|
sed -i -e 's/@${CC}/${CC}/' -e 's/@$(CC)/$(CC)/' Makefile
|
||
9 years ago
|
|
||
4 years ago
|
# config patches
|
||
9 years ago
|
sed -i -e s:UID=0:UID=65534:g \
|
||
4 years ago
|
-e s:GID=0:GID=65534:g \
|
||
|
-e s:DAEMON=0:DAEMON=1:g \
|
||
|
-e s:DEBUG=3:DEBUG=0:g \
|
||
|
-e s:DATABASE_KEEPALIVE=0:DATABASE_KEEPALIVE=1:g \
|
||
|
policyd.conf || die
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
append-cflags -fcommon
|
||
|
default
|
||
9 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
6 years ago
|
emake CC=$(tc-getCC) build
|
||
9 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
insopts -o root -g nobody -m 0750
|
||
4 years ago
|
mv cleanup policyd_cleanup || die
|
||
|
mv stats policyd_stats || die
|
||
9 years ago
|
|
||
|
dosbin policyd policyd_cleanup policyd_stats
|
||
|
|
||
|
insopts -o root -g nobody -m 0640
|
||
|
insinto /etc
|
||
|
doins policyd.conf
|
||
|
|
||
|
insopts -o root -g nobody -m 0700
|
||
|
exeinto /etc/cron.hourly
|
||
4 years ago
|
newexe "${FILESDIR}"/${PN}-cleanup.cron ${PN}-cleanup.cron
|
||
9 years ago
|
|
||
|
dodoc ChangeLog DATABASE.mysql README doc/support.txt
|
||
|
|
||
4 years ago
|
newinitd "${FILESDIR}"/${PN}.rc policyd
|
||
|
newconfd "${FILESDIR}"/${PN}.confd policyd
|
||
9 years ago
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
elog "You will need to create the database using the script DATABASE.mysql"
|
||
|
elog "in /usr/share/doc/${PF}/"
|
||
|
elog "Read the mysql section of the README.txt for details."
|
||
|
elog
|
||
|
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."
|
||
|
}
|