aboutsummaryrefslogtreecommitdiffstats
path: root/testing/postfwd
diff options
context:
space:
mode:
authorSimon Frankenberger <simon@fraho.eu>2019-04-12 06:54:56 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2019-04-14 21:31:23 +0000
commit0383b528c3a5a5da2a528c8b27903e352eb643e2 (patch)
treea41e4a1e71d67d1eafd7b067b4160e990359fe25 /testing/postfwd
parent9fe3d51ca4341836d86347d7cb288af4650afad8 (diff)
downloadaports-0383b528c3a5a5da2a528c8b27903e352eb643e2.tar.bz2
aports-0383b528c3a5a5da2a528c8b27903e352eb643e2.tar.xz
testing/postfwd2: Rename to postfwd
Diffstat (limited to 'testing/postfwd')
-rw-r--r--testing/postfwd/APKBUILD47
-rw-r--r--testing/postfwd/postfwd2.confd19
-rw-r--r--testing/postfwd/postfwd2.initd18
3 files changed, 84 insertions, 0 deletions
diff --git a/testing/postfwd/APKBUILD b/testing/postfwd/APKBUILD
new file mode 100644
index 0000000000..a68cca55a6
--- /dev/null
+++ b/testing/postfwd/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
+# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
+pkgname=postfwd
+pkgver=1.39
+pkgrel=0
+pkgdesc="Combines complex postfix restrictions in a ruleset similar to those of the most firewalls"
+url="https://postfwd.org/"
+arch="noarch"
+license="BSD"
+depends="perl-net-server perl-net-dns perl-io-multiplex"
+subpackages="$pkgname-doc $pkgname-openrc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
+ ${pkgname}2.initd
+ ${pkgname}2.confd
+ "
+options="!check" # package has no tests
+builddir="$srcdir/$pkgname-$pkgver"
+pkgusers="postfwd"
+pkggroups="postfwd"
+install="$pkgname.pre-install"
+provides="postfwd2=$pkgver-r$pkgrel" # for backward compatibility
+replaces="postfwd2" # for backward compatibility
+
+build() {
+ cd "$builddir"
+ # just print out version to check if all dependencies are met
+ sbin/postfwd2 -V
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/sbin \
+ "$pkgdir"/usr/share/doc/postfwd2 \
+ "$pkgdir"/usr/share/man/man8 \
+ "$pkgdir"/etc/postfwd2 \
+ "$pkgdir"/etc/init.d
+ install -m0755 sbin/postfwd2 "$pkgdir"/usr/sbin
+ install -m0644 doc/* "$pkgdir"/usr/share/doc/postfwd2
+ install -m0644 man/man8/* "$pkgdir"/usr/share/man/man8
+ install -m0644 etc/postfwd.cf.sample "$pkgdir"/etc/postfwd2
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+sha512sums="b292b3d5cb634fedc039b33225e5f3e5653a25e56b5b2d9a5936d0a9d59ddb9a0fef129221f23859a679609eed57f4c7f20299f4895a48600cc78d2e22756a16 postfwd-1.39.tar.gz
+b33ebb90d5e38f2af3cd93d0205672d83a618b253e22a6fc10cffee4b1e75513189f6214ae25a910913119c1ce0178fabdd95cc10c47ac1f85093953c4e04f5a postfwd2.initd
+e1ead4e130c593fabf6ce28fdbdf74806bd922556b492976c03b3578112c533ca60645ad11786785763abf6dd94fee37f2e7261661314f712f9f46fad2acd20d postfwd2.confd"
diff --git a/testing/postfwd/postfwd2.confd b/testing/postfwd/postfwd2.confd
new file mode 100644
index 0000000000..7f16ef108b
--- /dev/null
+++ b/testing/postfwd/postfwd2.confd
@@ -0,0 +1,19 @@
+# /etc/conf.d/postfwd2.conf
+
+# User and group to execute postfwd as
+POSTFWD2_USER="postfwd2"
+POSTFWD2_GROUP="postfwd2"
+
+# Configuration file to use
+POSTFWD2_CONFIG="/etc/postfwd2/postfwd.cf"
+
+# The IP address postfwd will listen on
+# WARNING: You _really_ want this to be localhost for security!
+POSTFWD2_LISTEN="127.0.0.1"
+
+# The port postfwd will listen on
+POSTFWD2_PORT="10040"
+
+# Additional options to pass to postfwd
+POSTFWD2_OPTS=""
+
diff --git a/testing/postfwd/postfwd2.initd b/testing/postfwd/postfwd2.initd
new file mode 100644
index 0000000000..4206c8c01a
--- /dev/null
+++ b/testing/postfwd/postfwd2.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+command="/usr/sbin/postfwd2"
+pidfile="/run/postfwd2.pid"
+command_args="--file ${POSTFWD2_CONFIG}
+--interface=${POSTFWD2_LISTEN}
+--port=${POSTFWD2_PORT}
+--user=${POSTFWD2_USER}
+--group=${POSTFWD2_GROUP}
+--pidfile ${pidfile}
+${POSTFWD2_OPTS}
+"
+command_args_background="--daemon"
+
+depend() {
+ need net
+}
+