summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter/policyd')
-rw-r--r--mail-filter/policyd/metadata.xml10
-rw-r--r--mail-filter/policyd/policyd-1.82-r1.ebuild76
-rw-r--r--mail-filter/policyd/policyd-1.82-r4.ebuild (renamed from mail-filter/policyd/policyd-1.82-r3.ebuild)57
3 files changed, 35 insertions, 108 deletions
diff --git a/mail-filter/policyd/metadata.xml b/mail-filter/policyd/metadata.xml
index e38074e80020..7cc2ec0db693 100644
--- a/mail-filter/policyd/metadata.xml
+++ b/mail-filter/policyd/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="sourceforge">policyd</remote-id>
- </upstream>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">policyd</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/mail-filter/policyd/policyd-1.82-r1.ebuild b/mail-filter/policyd/policyd-1.82-r1.ebuild
deleted file mode 100644
index ab88aeb093eb..000000000000
--- a/mail-filter/policyd/policyd-1.82-r1.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=0
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="Policy daemon for postfix and other MTAs"
-HOMEPAGE="http://policyd.sf.net/"
-
-# This is not available through SF mirrors
-SRC_URI="http://policyd.sourceforge.net/${P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~hppa x86"
-IUSE=""
-DEPEND="virtual/mysql
- dev-libs/openssl"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}/${PN}-post182.patch"
- epatch "${FILESDIR}/${PN}-makefile.patch"
- sed -i -e "s/gcc/$(tc-getCC)/" Makefile
-
- ebegin "Applying config patches"
- sed -i -e s:UID=0:UID=65534:g \
- -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 "sed failed"
- eend
-}
-
-src_compile() {
- emake build || die "emake build failed"
-}
-
-src_install() {
- insopts -o root -g nobody -m 0750
- mv cleanup policyd_cleanup
- mv stats policyd_stats
-
- 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
- newexe "${FILESDIR}/${PN}-cleanup.cron" ${PN}-cleanup.cron
-
- dodoc ChangeLog DATABASE.mysql README doc/support.txt
-
- newinitd "${FILESDIR}/${PN}.rc" ${PN}
- newconfd "${FILESDIR}/${PN}.confd" ${PN}
-}
-
-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."
-}
diff --git a/mail-filter/policyd/policyd-1.82-r3.ebuild b/mail-filter/policyd/policyd-1.82-r4.ebuild
index 0d1be22af1b6..a589b431e0d4 100644
--- a/mail-filter/policyd/policyd-1.82-r3.ebuild
+++ b/mail-filter/policyd/policyd-1.82-r4.ebuild
@@ -1,51 +1,54 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=7
-inherit toolchain-funcs
+inherit flag-o-matic toolchain-funcs
DESCRIPTION="Policy daemon for postfix and other MTAs"
-HOMEPAGE="http://policyd.sf.net/"
+HOMEPAGE="https://wiki.policyd.org"
+SRC_URI="https://download.policyd.org/v${PV}/${P}.tar.gz"
-# This is not available through SF mirrors
-SRC_URI="http://policyd.sourceforge.net/${P}.tar.gz"
-LICENSE="GPL-2"
+LICENSE="GPL-2+"
SLOT="0"
-KEYWORDS="~amd64 ~hppa ~x86"
-IUSE="libressl"
-DEPEND="dev-db/mysql-connector-c:0=
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )"
+KEYWORDS="amd64 ~hppa x86"
+
+DEPEND="
+ dev-db/mysql-connector-c:0=
+ dev-libs/openssl:0="
RDEPEND="${DEPEND}"
PATCHES=(
- "${FILESDIR}/${PN}-post182.patch"
- "${FILESDIR}/${PN}-makefile.patch"
+ "${FILESDIR}"/${PN}-post182.patch
+ "${FILESDIR}"/${PN}-makefile.patch
)
src_prepare() {
default
sed -i -e 's/@${CC}/${CC}/' -e 's/@$(CC)/$(CC)/' Makefile
- ebegin "Applying config patches"
+ # config patches
sed -i -e s:UID=0:UID=65534:g \
- -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 "sed failed"
- eend
+ -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
}
src_compile() {
- emake CC=$(tc-getCC) build
+ emake CC="$(tc-getCC)" build
}
src_install() {
insopts -o root -g nobody -m 0750
- mv cleanup policyd_cleanup
- mv stats policyd_stats
+ mv cleanup policyd_cleanup || die
+ mv stats policyd_stats || die
dosbin policyd policyd_cleanup policyd_stats
@@ -55,12 +58,12 @@ src_install() {
insopts -o root -g nobody -m 0700
exeinto /etc/cron.hourly
- newexe "${FILESDIR}/${PN}-cleanup.cron" ${PN}-cleanup.cron
+ newexe "${FILESDIR}"/${PN}-cleanup.cron ${PN}-cleanup.cron
dodoc ChangeLog DATABASE.mysql README doc/support.txt
- newinitd "${FILESDIR}/${PN}.rc" ${PN}
- newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}"/${PN}.rc policyd
+ newconfd "${FILESDIR}"/${PN}.confd policyd
}
pkg_postinst() {