[arch-commits] Commit in postfwd/repos (4 files)

Florian Pritz bluewind at nymeria.archlinux.org
Sat Aug 31 18:50:23 UTC 2013


    Date: Saturday, August 31, 2013 @ 20:50:23
  Author: bluewind
Revision: 96559

archrelease: copy trunk to community-any

Added:
  postfwd/repos/community-any/
  postfwd/repos/community-any/PKGBUILD
    (from rev 96558, postfwd/trunk/PKGBUILD)
  postfwd/repos/community-any/install
    (from rev 96558, postfwd/trunk/install)
  postfwd/repos/community-any/service
    (from rev 96558, postfwd/trunk/service)

----------+
 PKGBUILD |   44 ++++++++++++++++++++++++++++++++++++++++++++
 install  |   18 ++++++++++++++++++
 service  |   11 +++++++++++
 3 files changed, 73 insertions(+)

Copied: postfwd/repos/community-any/PKGBUILD (from rev 96558, postfwd/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2013-08-31 18:50:23 UTC (rev 96559)
@@ -0,0 +1,44 @@
+# Maintainer: Florian Pritz <bluewind at xinu.at>
+# Contributor: Phillip Smith <fukawi2 at NO-SPAM.gmail.com>
+
+pkgname=postfwd
+pkgver=1.35
+pkgrel=2
+pkgdesc="Combines complex postfix restrictions in a ruleset similar to those of the most firewalls"
+arch=(any)
+url="http://postfwd.org/"
+license=('bsd')
+install="install"
+depends=('perl' 'perl-io-multiplex' 'perl-net-server' 'perl-net-dns')
+source=("http://postfwd.org/$pkgname-$pkgver.tar.gz"
+        "service")
+md5sums=('8e01328416c735d55efec90dede8bff2'
+         '1c9295de6da98241eb55e62809746030')
+
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  sed -i bin/postfwd-script.sh \
+      -e 's|PFWCMD=/usr/local/postfwd/sbin/postfwd|PFWCMD=/usr/bin/postfwd|g'
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  install -dm755 "$pkgdir"/{etc/$pkgname,usr/{bin,share/{man,$pkgname}}}
+
+  cp -ra etc/*    "$pkgdir/etc/$pkgname/"
+  cp -ra -t "$pkgdir/usr/bin/" bin/* sbin/*
+  cp -ra man/*    "$pkgdir/usr/share/man/"
+  cp -ra tools/*  "$pkgdir/usr/share/$pkgname/"
+  cp -ra doc/*    "$pkgdir/usr/share/$pkgname/"
+
+  install -Dm644 $srcdir/service "$pkgdir/usr/lib/systemd/system/${pkgname}.service"
+  install -Dm644 $srcdir/service "$pkgdir/usr/lib/systemd/system/${pkgname}2.service"
+  sed -i 's|/usr/bin/postfwd|/usr/bin/postfwd2|' "$pkgdir/usr/lib/systemd/system/${pkgname}2.service"
+
+  install -dm755 $pkgdir/usr/share/licenses/$pkgname
+  mv $pkgdir/usr/share/$pkgname/LICENSE $pkgdir/usr/share/licenses/$pkgname
+}
+
+# vim:set ts=2 sw=2 et:

Copied: postfwd/repos/community-any/install (from rev 96558, postfwd/trunk/install)
===================================================================
--- community-any/install	                        (rev 0)
+++ community-any/install	2013-08-31 18:50:23 UTC (rev 96559)
@@ -0,0 +1,18 @@
+post_install() {
+	getent group postfwd  &>/dev/null || groupadd -g 180 postfwd  >/dev/null
+	getent passwd postfwd &>/dev/null || useradd -u 180 -d /var/empty -g postfwd -s /bin/false postfwd >/dev/null
+	true
+}
+
+post_upgrade() {
+	if  [ "$(vercmp $2 1.35-2)" -lt 0 ]; then
+		echo 'The config file moved to /etc/postfwd/postfwd.cf and postfwd will'
+		echo 'run under the postfwd user. Please make sure to adjust your setup.'
+	fi
+}
+
+pre_remove() {
+	getent passwd postfwd &>/dev/null && userdel  postfwd  >/dev/null
+	getent group postfwd  &>/dev/null && groupdel postfwd  >/dev/null
+	true
+}

Copied: postfwd/repos/community-any/service (from rev 96558, postfwd/trunk/service)
===================================================================
--- community-any/service	                        (rev 0)
+++ community-any/service	2013-08-31 18:50:23 UTC (rev 96559)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Postfix firewall daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/postfwd --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --daemon --file=/etc/postfwd/postfwd.cf --interface=127.0.0.1 --port=10040 --pidfile=/var/run/postfwd.pid --user=postfwd --group=postfwd
+ExecStop=/usr/bin/postfwd --file=/etc/postfwd/postfwd.cf --pidfile=/var/run/postfwd.pid --kill
+ExecReload=/usr/bin/postfwd --file=/etc/postfwd/postfwd.cf --pidfile=/var/run/postfwd.pid --reload
+
+[Install]
+WantedBy=multi-user.target




More information about the arch-commits mailing list