summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail-filter/policyd-weight/Manifest1
-rw-r--r--mail-filter/policyd-weight/files/policyd-weight.init.d-r231
-rw-r--r--mail-filter/policyd-weight/files/policyd-weight.tmpfile1
-rw-r--r--mail-filter/policyd-weight/policyd-weight-0.1.15.2-r2.ebuild59
4 files changed, 92 insertions, 0 deletions
diff --git a/mail-filter/policyd-weight/Manifest b/mail-filter/policyd-weight/Manifest
index 39903afe685..4a1932240a8 100644
--- a/mail-filter/policyd-weight/Manifest
+++ b/mail-filter/policyd-weight/Manifest
@@ -1 +1,2 @@
+DIST policyd-weight-0.1.15.2-patches-1.0.tar.xz 6920 BLAKE2B 92bcf7b11dc5e07d5c8f10b9c103ac52b1d8e3449beb6e049311c2360ecb59d8751e35e20453c8dc402b286cf028f44cbdcc8bc45cf202a2af883d8954ae5e51 SHA512 a2d4ecd2ee76180cb6ebb0790a04e4fb101e9e6a73a253b83473ebb8952bc88cc903a8ea51b84743419dd8bc974a8ffc9378a187f8b8b65620268c382aaaa94e
DIST policyd-weight-0.1.15.2.tar.gz 75347 BLAKE2B 3eba7a8909557b6f8ddc1ec0930e8b0c5d4a2ec213116977c8b340f52643491fc4ae81b7c9d319484e7584fe7c3c6c6aea92d7eecba7637d0f6378e00c64c28f SHA512 37702762c171b208d37651b2051b521e4f44708b7bb7e0d3001fd2ba123b227c847bad8dd479d7a56f9aeab02fdfd957d34b2c4d7f3a9fd727614cd4031f8b78
diff --git a/mail-filter/policyd-weight/files/policyd-weight.init.d-r2 b/mail-filter/policyd-weight/files/policyd-weight.init.d-r2
new file mode 100644
index 00000000000..390bc3d2892
--- /dev/null
+++ b/mail-filter/policyd-weight/files/policyd-weight.init.d-r2
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+
+extra_started_commands="reload"
+
+daemon="policyd-weight"
+exec="/usr/libexec/postfix/policyd-weight"
+
+pidfile=/run/policyd-weight.pid
+
+depend(){
+ before postfix
+ use net
+}
+
+start(){
+ ebegin "Starting ${daemon}"
+ ${exec} start
+ eend $?
+}
+
+stop(){
+ ebegin "Stopping ${daemon}"
+ ${exec} -k stop
+ eend $?
+}
+
+reload(){
+ ebegin "Reloading ${daemon}"
+ ${exec} reload
+ eend $?
+}
diff --git a/mail-filter/policyd-weight/files/policyd-weight.tmpfile b/mail-filter/policyd-weight/files/policyd-weight.tmpfile
new file mode 100644
index 00000000000..1eeddb77278
--- /dev/null
+++ b/mail-filter/policyd-weight/files/policyd-weight.tmpfile
@@ -0,0 +1 @@
+d /run/policyd-weight 0755 polw polw
diff --git a/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r2.ebuild b/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r2.ebuild
new file mode 100644
index 00000000000..d4850b609ee
--- /dev/null
+++ b/mail-filter/policyd-weight/policyd-weight-0.1.15.2-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit user tmpfiles
+
+PATCH_VER="1.0"
+
+DESCRIPTION="Weighted Policy daemon for Postfix"
+HOMEPAGE="http://www.policyd-weight.org/"
+SRC_URI="http://www.policyd-weight.org/releases/${P}.tar.gz
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
+ https://dev.gentoo.org/~whissi/dist/${PN}/${P}-patches-${PATCH_VER}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="virtual/perl-File-Spec
+ virtual/perl-Sys-Syslog
+ dev-perl/Net-DNS
+ dev-perl/Net-IP
+ >=mail-mta/postfix-2.1"
+
+pkg_setup() {
+ enewgroup 'polw'
+ enewuser 'polw' -1 -1 -1 'polw'
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/patches/*.patch
+
+ default
+}
+
+src_compile() { :; }
+
+src_install() {
+ exeinto /usr/libexec/postfix
+ doexe policyd-weight
+ fowners root:wheel /usr/libexec/postfix/policyd-weight
+
+ doman man/man5/*.5 man/man8/*.8
+ dodoc *.txt
+
+ insinto /etc
+ newins policyd-weight.conf.sample policyd-weight.conf
+
+ newinitd "${FILESDIR}/${PN}.init.d-r2" "${PN}"
+
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+}
+
+pkg_postinst() {
+ tmpfiles_process "${PN}.conf"
+}