summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-01-08 15:03:06 +0000
committerJustin Lecher <jlec@gentoo.org>2014-01-08 15:03:06 +0000
commite9f73972b59011f7efaab1db6bb2031fdcd6dd72 (patch)
treeb33b46dca0e49b907a6436bccca8eb97d04844db /mail-mta/nullmailer
parentUpdate live ebuild now that upstream has merged out-of-source patch (diff)
downloadhistorical-e9f73972b59011f7efaab1db6bb2031fdcd6dd72.tar.gz
historical-e9f73972b59011f7efaab1db6bb2031fdcd6dd72.tar.bz2
historical-e9f73972b59011f7efaab1db6bb2031fdcd6dd72.zip
mail-mta/nullmailer: Port debian patches to 0.13 which enables syslog again, #496960
Package-Manager: portage-2.2.8/cvs/Linux x86_64 Manifest-Sign-Key: 0xB9D4F231BD1558AB!
Diffstat (limited to 'mail-mta/nullmailer')
-rw-r--r--mail-mta/nullmailer/ChangeLog11
-rw-r--r--mail-mta/nullmailer/Manifest34
-rw-r--r--mail-mta/nullmailer/files/init.d-nullmailer-r156
-rw-r--r--mail-mta/nullmailer/files/init.d-nullmailer-r256
-rw-r--r--mail-mta/nullmailer/files/remotes.sample-1.0420
-rw-r--r--mail-mta/nullmailer/files/remotes.sample-1.1129
-rw-r--r--mail-mta/nullmailer/nullmailer-1.13-r3.ebuild166
7 files changed, 191 insertions, 181 deletions
diff --git a/mail-mta/nullmailer/ChangeLog b/mail-mta/nullmailer/ChangeLog
index a0ccb25a8584..e2bb122f29b3 100644
--- a/mail-mta/nullmailer/ChangeLog
+++ b/mail-mta/nullmailer/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-mta/nullmailer
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/ChangeLog,v 1.79 2013/12/21 18:56:55 ago Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/ChangeLog,v 1.80 2014/01/08 15:03:05 jlec Exp $
+
+*nullmailer-1.13-r3 (08 Jan 2014)
+
+ 08 Jan 2014; Justin Lecher <jlec@gentoo.org> +nullmailer-1.13-r3.ebuild,
+ -files/remotes.sample-1.04, -files/remotes.sample-1.11,
+ -files/init.d-nullmailer-r1, -files/init.d-nullmailer-r2:
+ Port debian patches to 0.13 which enables syslog again, #496960
21 Dec 2013; Agostino Sarubbo <ago@gentoo.org> nullmailer-1.13-r2.ebuild:
Stable for ppc, wrt bug #480060
diff --git a/mail-mta/nullmailer/Manifest b/mail-mta/nullmailer/Manifest
index 120a7db54fdc..167fa0167bcf 100644
--- a/mail-mta/nullmailer/Manifest
+++ b/mail-mta/nullmailer/Manifest
@@ -1,31 +1,29 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
-AUX init.d-nullmailer-r1 1220 SHA256 53647c3756bdff6b3753f91f1aed61649f35294ae06e757b613ab58b5ca55c85 SHA512 174d0e33f9cfd4c34d937f64b74084ca56b6c600d55a4ddee24c42b8b1f6c69d73d3126bfd943ce47c8121751a3cf331cea4bd2f703e610d3c7f1835510782d4 WHIRLPOOL 4d0acdf85725b74b356af4d4346ae73d21f53682b649f9fbbde111e0725cdd4d29ac81cca54f7b2bab5e0d93002db5ef6d9427a0bcf9e7ab41673776792a7cc3
-AUX init.d-nullmailer-r2 1219 SHA256 48c4e38577a6b02cab0e7db9235f09b93edbfb273cb31308500fa9023d0cf41e SHA512 05996148cdd38d5da63fc30bfcd50cf5e37b56ed64d20ede70be5ee340d9998a0636a4f9c30345439394005ddf25eb2866de030f053e742d7f1de96aaed059c3 WHIRLPOOL 5553219caf2f92777cd55ee21834b83dd280a894ef2a38cd25097fe3ba9c0f16dee105338a95f68437100de697a2722ead5463db2f405ea83e6b0395b1a9aac8
AUX init.d-nullmailer-r3 1076 SHA256 1f59a1e06c5c709f16343c581ffa318f4c8eb342b77f86af52af8d736f77b6bd SHA512 041d6269a270cd8aea1b1d5b9175d5de3e44386e87e6f14109416459f6b484caf4f85a200644c4e0ea5c431e6b58c6804e56c0f961ac23eecfd7ff7026761945 WHIRLPOOL b71cef10bfe9211d08f03c4fa480a8a5c2a33ff42c8889a273303af37b8e6b75a7bf29e0f90ddff4410675daf0cb4276efa1e3186b4c6006a22c1c3a0bbfe60b
AUX nullmailer.service 398 SHA256 a8083aa8c784fef00c6b0dab6733874edbbf1d01c2060bc512f83168eba8485a SHA512 09efea2dde679f5fda9afee376351c54a71742aff21457481ced5cffdcccd837e12c742c9f1cf65dfb63cbf73f2a7ddfa89d09dee1169a8a05daf47d0e5f73c9 WHIRLPOOL 2d6697dbf52f10ae3136828b018c7bd949e61e8d170001207aaa1d16f3ac60e3ec64d15e6ff73a32a40de1aaefa6dda4d55fa54e54f2735babe3241925310a19
-AUX remotes.sample-1.04 540 SHA256 d9f756d9a2b21e7f7166c1b29a34c4dda1eb1ab0c57168ded3d0ed225cf692ee SHA512 ea0e75253804d792cab14d672ef88ccfc93b2d47c7e936e9de10b130a3270f5ca16b019ef71fc13f74ddd1fe12272060ae6664357b1dc019b9c93950bc0a583e WHIRLPOOL ed2af783ae2648cf23ce73523d47e462f809694b19c31055e2d0419da750ebff1c2403b1defad56b21c1d3a95d863f1880f391f52d1a30057d588ac1263371fa
-AUX remotes.sample-1.11 971 SHA256 a315887401d0fba184ace7b9ea9adfad3cb09b73884f4982dc4fe705079af15e SHA512 a3d305beb4526e20bbb5c92b4ed3afee21a9b926dd1067317351b54c4942d36f1e23b80f2fe503be8ea07597fdc728fa8c78394e7cc2e6cac7d50b7e74bb6494 WHIRLPOOL ee6417a5e963706f2824632f7a8004047ab96a17d9cd164339759572eb06449825fcbfa072750144faaa9d817efb1b6e11b451949f052ccd7fc490b410d85896
AUX remotes.sample-1.13 970 SHA256 56b9adc7762cfac88769ee6a87fa5057a42599a3d50a3cfd1c6d8d9327d02080 SHA512 8ff23a3f30e9f3b8bfca05f6e8bda44d8142b547c667d604e5e1f15b49342e0a098591578ef26c599a965d0b17e7237232e6713bb7b95b2af4e3bf6bde2604c6 WHIRLPOOL 39e87ec264d023c4d3852d1173bf9e87b8eb35fe3809c9ebfa3d2c9be81ad9a709fc1c873697be8ad80c01881566542cb8950a5e312ed9e06c65535c8cd4dac4
DIST nullmailer-1.13.tar.gz 205431 SHA256 3f8861ebb1b46cea0a1caf1e6236e1e0d2a5a91def19551b7cad12eab676277d SHA512 96dcb3ddecde77a73e5ca1afa5167d35f965d04999f02cc2ef60b54ea7eb7a006e5cf5678fc34a54d4be4f9fd71bd0f784a8671aca40c70dbc307666c548e1d7 WHIRLPOOL b041f7cc33a257fad11c5f4c9bf74f8d849d9c45f0dc19be28268462b9d029c07e1d5802698e647a4208d5f66cac2177a1d12e49a03caac51e0244c3f9a0599c
+DIST nullmailer-patches-1.13.tar.xz 8384 SHA256 8685dfbf23e9dc15269b1a0d14f700c4ef990cf49d4e6e830c0217289e8f4733 SHA512 393531e39a92b0978bccbcdf123e05b2cdad1ec8e600825cc24177ba414c1f615995c0344291ebb664f42b384a160c0359fec5ba3308cc14cbc9ceb8577d799c WHIRLPOOL 84f523be7963ceb7fbafd3f5632571e7bc12085b1b4bce5bb5c63871fd6c7ed1367a49ddf5ed66acad7055e28856b23fb1dcb59e60158fed26447128edd0a4fa
EBUILD nullmailer-1.13-r2.ebuild 4591 SHA256 9e0436548344929ca230a5fac83425f4faa16e0aff77e969d208f2254db10106 SHA512 c75584d2b01022cb89ea80654154598314b017cb3bd83c88c3b102a3b5be38f8ce6cf3ce518b8606626ac67dd75bf4238f27b5af23d3d1338c65212e0c952361 WHIRLPOOL dda295707aa653c8bb5e81b8d4df88a70e89b7a8cb7088aca6f23491203b4f3a83c51befb48ee7e3ed708eeeb1e2f15ff5aa80f8bfe150c9c2d2d35b86d52aa4
-MISC ChangeLog 14611 SHA256 a19b157c0f9b1e39f990bc33b177f1d22eb46c65171809e6e776a7b107b5dcc7 SHA512 e7a568179189be7fd105009deae312c0f118c10057af81bdf8667ebe2282a937bd2c05716b3709bc1b864eec7d83c12fb010b18edccb6109814ebfb64c2fa7da WHIRLPOOL a256b90e589347d2abdefc9744ac3dd65e573c93b61ef06e07e430e9ce884348c9dfd68c44459f96a589ac4dbe624fb43a10dfd1e506b7f5bf98821621a7bff9
+EBUILD nullmailer-1.13-r3.ebuild 4782 SHA256 c4391a3149478d2349aea19a28534798a75eaa29b8e907a62e584a92a5b18ff3 SHA512 551c77af036e4d7bc056bbc305057b2df7dfb23657528c985e09c9320fbbae4df470d4c512499b5784c0d26010c54a3a54e606ef5faf1f1ff6c402f7bef03850 WHIRLPOOL c30f6f467f9f1e738c716c00744e5020d41db186cc9f3a0d372dfd7ac6ede910a637b80321b56e56a894f6dfa5fd35f9ebdf061b751a803420f6b5d849885b75
+MISC ChangeLog 14907 SHA256 55d1c7451b7bfcb1c421ec8f5cac33de0a48a67bc44c2ae65fb00290ace6171f SHA512 58aa54e5a81d2a5a04009e92cbb456affa6048e6dab0beb8604cfcea39d8819c089fcd66584756850630540059396ffa47305db0e0dbee326f598d4512d93f9d WHIRLPOOL fe1e2d49c1b805aabe0f9cead500e75c0c39e3c23f0334a282aea9c27cbc114a1680d85bf6757bcda7c312846176e6ca2311c952ef5d9e84a51457caddf6e5bc
MISC metadata.xml 363 SHA256 838fae6a4f4cabb0217b0d1ebbd63acf840e802b3852e7360a4b9ae12a10459e SHA512 18675ce1eba12e093f0d73ac35ca6e456d2d7c0b1f3eee41d9b5bb466391778e3aed877d06028e7fa28c121dfff20fd6729451e5c5706a5ebc33a4f3c10c6f85 WHIRLPOOL d8911b227b42c2f4e47d68cb72f65c1e3349df2e34659aa4a597522138e9f8b055913829e504e11492db81081fbeb51e4b62512aeffde65d105e1120fbd572a4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCgAGBQJSteOGAAoJELp701BxlEWfgwsQAMTaJGXCuFLqjwuriHgB8iAZ
-G2fp1VWbA9Sfl14cLDf+U+HL9UlZ/BBZOrCHWUfdTqnV3oBFnBVI/7sYq836D3GW
-GgUS7y/ZrPPN2zHwNeCSHgiwvDDnx3vVkBoAIaNRiKRqcsMfw9O3WbMxc1Tax32b
-A4afrPNdOmpKJ7O1Y3UkRY6i0BS6UB0Px5hOChmUcTZXzUQXh1t68wUhzA/lgkdI
-0s74YyjGo4ZTE3axOdn9qxDbhQSlFjYA/Vm2KitmYU5UeT0+Vsp/2MnoWGv3XwyO
-cHcvl/PrX6KTGlV7IHFIROUfObJB8+UIsuIH+B1Y8pY5iktS6nx33yKw8bfyhkKM
-8ay7LvoCorD17VoEHMdfs/dqsVNFWQKNuYzJ4EKP6rQbH7+EAEowQpjhYc00NLiA
-pH270iMoSnzF6S/i3tO1qXQ0M6AiFoqrsw3fa7PjmL+f884x1FWnkJB/9C7G+g3R
-od6XG+5VK7TytJSNr+WQMspM82lesIO/u8P7V0oQAcjMXqYJm81wkmieNlYcZEKZ
-J1RG9xwGOgYKBY/+lqxVOUFLWptXcQpak6A51X9sh7ZzN3WnzvS4aQO3rWXcnJ/p
-whUr1H3+z5okBBDqa6vj323R3HGrIXTRR4GeixG+1fUVrggZFBjvKoJPdutNm3j2
-gN/Ck9XtPL0TSpp1CpJR
-=43oE
+iQIcBAEBCgAGBQJSzWiqAAoJELnU8jG9FVir7jEP/iqVzJBTxrsldvKr8ZWOq4ET
+BmVLnG0FWvflrWo5vvfsZytALDc4OwFFPG640S8ySp8AG0eTYSdk7DlxmXCDiwKM
+cv5KTgoYP2QslkL+NTiNkFK8g6kwxbP79GbJJF9cPSmp1WMCyqQup5I/+SmXEs95
+7QhcKHX2+IC9lO4ueTZUPcBHqpK5nMXF9mcetU7NGJLwWfxQqLM1dVN1p9L8l+KM
+xz4TkKYeNTJDVizOFsjmFZpcJCWFQEq8szMMHMuHzYHdbSo5ng2P3MCCZhJrAclk
+mkBrpk7ohysceEuV5xEBF2Egz23U/N17UaJaNrWnQMpyF9skv/9Pc23O/A7vlkzQ
+Ki38TnzcrrkaJZN3h+S/bf+vVhqr/AnM6tgN9IYvfts1cnv0XPCEn//7cVP7xuNP
+dfEekcOWK80RLfVxxvWpMYJa4KyDBNxf4C2wWMxkgshMck7p0+Coig3prdQplJ8T
+Jl0eiSwHVy0ITcN2/JhbGrozJfQ9cpFPv6c6QdrjlVJukE+jtn/2erGTEzpSDvGV
+eP+a/rokfqrGWoaaGBm5VmVVkD3rlBOEAm8ghlveQoToKcJBaoYc17x8DxQem+DF
++m/ca7edXkwK2l5ieKv9mE6MGk62QpVgX5lIaag9YQ8Mhp4rLnOIz6JFPrH4chx6
+X0accQznP25GHTnZa39W
+=68kx
-----END PGP SIGNATURE-----
diff --git a/mail-mta/nullmailer/files/init.d-nullmailer-r1 b/mail-mta/nullmailer/files/init.d-nullmailer-r1
deleted file mode 100644
index 5b5f58e110b9..000000000000
--- a/mail-mta/nullmailer/files/init.d-nullmailer-r1
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/files/init.d-nullmailer-r1,v 1.1 2012/06/05 13:48:55 eras Exp $
-
-DAEMON="/usr/sbin/nullmailer-send"
-ARGS="--daemon"
-USER=nullmail
-GROUP=nullmail
-
-depend() {
- need net logger
-}
-
-checkconfig() {
- local error=0
- local f=/etc/nullmailer/me
- if [ ! -s ${f} ]; then
- eerror "${f} does not exist"
- error=1
- fi
- f=/etc/nullmailer/defaultdomain
- if [ ! -s ${f} ]; then
- eerror "${f} does not exist"
- error=1
- fi
- if [ ${error} -eq 1 ]; then
- einfo "You need to run 'emerge --config nullmailer'!"
- fi
- if [ -e /service/nullmailer ]; then
- eerror "Nullmailer is already running under svscan!"
- error=2
- fi
- if [ ${error} -ne 0 ]; then
- return 1
- else
- return 0
- fi
-}
-
-start() {
- checkconfig
- ebegin "Starting nullmailer"
- cd /var/nullmailer
- start-stop-daemon --start --quiet --user ${USER}:${GROUP} \
- --exec ${DAEMON} -- ${ARGS}
- eend $?
-}
-
-stop() {
- checkconfig # to avoid init.d stopping svscan instance
- ebegin "Stopping nullmailer"
- cd /var/nullmailer
- start-stop-daemon --stop --user ${USER} --exec ${DAEMON}
- eend $?
-}
diff --git a/mail-mta/nullmailer/files/init.d-nullmailer-r2 b/mail-mta/nullmailer/files/init.d-nullmailer-r2
deleted file mode 100644
index 1043d962d52c..000000000000
--- a/mail-mta/nullmailer/files/init.d-nullmailer-r2
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/files/init.d-nullmailer-r2,v 1.2 2013/01/08 12:44:00 eras Exp $
-
-DAEMON="/usr/sbin/nullmailer-send"
-ARGS="--daemon"
-USER=nullmail
-GROUP=nullmail
-
-depend() {
- use net logger
-}
-
-checkconfig() {
- local error=0
- local f=/etc/nullmailer/me
- if [ ! -s ${f} ]; then
- eerror "${f} does not exist"
- error=1
- fi
- f=/etc/nullmailer/defaultdomain
- if [ ! -s ${f} ]; then
- eerror "${f} does not exist"
- error=1
- fi
- if [ ${error} -eq 1 ]; then
- einfo "You need to run 'emerge --config nullmailer'!"
- fi
- if [ -e /service/nullmailer ]; then
- eerror "Nullmailer is already running under svscan!"
- error=2
- fi
- if [ ${error} -ne 0 ]; then
- return 1
- else
- return 0
- fi
-}
-
-start() {
- checkconfig
- ebegin "Starting nullmailer"
- cd /var/nullmailer
- start-stop-daemon --start --quiet --user ${USER}:${GROUP} \
- --exec ${DAEMON} -- ${ARGS}
- eend $?
-}
-
-stop() {
- checkconfig # to avoid init.d stopping svscan instance
- ebegin "Stopping nullmailer"
- cd /var/nullmailer
- start-stop-daemon --stop --user ${USER} --exec ${DAEMON}
- eend $?
-}
diff --git a/mail-mta/nullmailer/files/remotes.sample-1.04 b/mail-mta/nullmailer/files/remotes.sample-1.04
deleted file mode 100644
index 3a6f449e466b..000000000000
--- a/mail-mta/nullmailer/files/remotes.sample-1.04
+++ /dev/null
@@ -1,20 +0,0 @@
-# Format is: HOST PROTOCOL [OPTIONS]
-# HOST = IP or DNS
-# PROTOCOL = smtp | qmtp
-# OPTIONS = [--port=NUMBER] [--auth=user,pass]
-#
-# Examples:
-# A standard SMTP server:
-# somesendmailserver.domain.com smtp
-#
-# A qmail server with QMQP setup:
-# someqmailserver.domain.com qmqp
-#
-# A nonstandard SMTP server setup:
-# someotherserver.domain.com smtp --port=2525
-#
-# SMTP server supporting AUTH PLAIN
-# mailserver smtp --user=<user> --pass=<pass>
-#
-# SMTP server supporting AUTH LOGIN
-# mailserver smtp --user=<user> --pass=<pass> --auth-login
diff --git a/mail-mta/nullmailer/files/remotes.sample-1.11 b/mail-mta/nullmailer/files/remotes.sample-1.11
deleted file mode 100644
index 4e692258691e..000000000000
--- a/mail-mta/nullmailer/files/remotes.sample-1.11
+++ /dev/null
@@ -1,29 +0,0 @@
-# Format is: HOST PROTOCOL [OPTIONS]
-# HOST = IP or DNS
-# PROTOCOL = smtp | qmtp
-# OPTIONS = [--port=NUMBER] [--auth=user,pass] [--starttls | --ssl [--insecure] ]
-#
-# Examples:
-# A standard SMTP server:
-# somesendmailserver.domain.com smtp
-#
-# A qmail server with QMQP setup:
-# someqmailserver.domain.com qmqp
-#
-# A nonstandard SMTP server setup:
-# someotherserver.domain.com smtp --port=2525
-#
-# SMTP server supporting AUTH PLAIN
-# mailserver smtp --user=<user> --pass=<pass>
-#
-# SMTP server supporting AUTH LOGIN
-# mailserver smtp --user=<user> --pass=<pass> --auth-login
-#
-# SMTP server with smtps (legacy - use starttls instead)
-# mailserver smtp --user=<user> --pass=<pass> --port=465 --ssl
-#
-# SMTP server on submission port with starttls
-# mailserver smtp --user=<user> --pass=<pass> --port=587 --starttls
-#
-# SMTP server on submission port with starttls and self-signed certificate
-# mailserver smtp --user=<user> --pass=<pass> --port=587 --starttls --insecure
diff --git a/mail-mta/nullmailer/nullmailer-1.13-r3.ebuild b/mail-mta/nullmailer/nullmailer-1.13-r3.ebuild
new file mode 100644
index 000000000000..41130af372a3
--- /dev/null
+++ b/mail-mta/nullmailer/nullmailer-1.13-r3.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/nullmailer-1.13-r3.ebuild,v 1.1 2014/01/08 15:03:05 jlec Exp $
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib systemd user
+
+MY_P="${P/_rc/RC}"
+
+DEBIAN_PV=1.11
+DEBIAN_PR="2"
+DEBIAN_P="${PN}-${DEBIAN_PV}"
+DEBIAN_PF="${DEBIAN_P/-/_}-${DEBIAN_PR}"
+DEBIAN_SRC="${DEBIAN_PF}.debian.tar.gz"
+
+DESCRIPTION="Simple relay-only local mail transport agent"
+HOMEPAGE="http://untroubled.org/nullmailer/"
+SRC_URI="
+ http://untroubled.org/${PN}/archive/${MY_P}.tar.gz
+ http://dev.gentoo.org/~jlec/distfiles/${PN}-patches-${PV}.tar.xz"
+# mirror://debian/pool/main/n/${PN}/${DEBIAN_SRC}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="ssl"
+
+DEPEND="
+ sys-apps/groff
+ ssl? ( net-libs/gnutls )"
+RDEPEND="
+ virtual/logger
+ virtual/shadow
+ ssl? ( net-libs/gnutls )
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp
+ !mail-mta/netqmail
+ !mail-mta/postfix
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !mail-mta/opensmtpd
+ !mail-mta/ssmtp"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup nullmail 88
+ enewuser nullmail 88 -1 /var/nullmailer nullmail
+}
+
+src_prepare() {
+# sed -i -e 's/nullmailer-1.10/nullmailer-1.11/g' \
+# "${WORKDIR}"/debian/patches/*.diff || die
+# EPATCH_OPTS="-d ${S} -p1" \
+# epatch "${DISTDIR}"/${DEBIAN_SRC}
+ # why revert? Ask Robin when he is back!
+# EPATCH_OPTS="-d ${WORKDIR} -p0 -R" \
+# epatch "${WORKDIR}"/debian/patches/02_ipv6.diff
+ # this fixes the debian daemon/syslog to actually compile
+
+ # old debian patches from 1.11
+ # DO NOT APPLY patch 0009... It breaks
+ epatch "${WORKDIR}"/patches/000{1..8}*patch
+
+ sed -i.orig \
+ -e '/^nullmailer_send_LDADD/s, =, = ../lib/cli++/libcli++.a,' \
+ "${S}"/src/Makefile.am || die "Sed failed"
+ sed -i.orig \
+ -e '/\$(localstatedir)\/trigger/d' \
+ "${S}"/Makefile.am || die "Sed failed"
+ sed \
+ -e "s:^AC_PROG_RANLIB:AC_CHECK_TOOL(AR, ar, false)\nAC_PROG_RANLIB:g" \
+ -i configure.in || die
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.in || die
+ eautoreconf
+}
+
+src_configure() {
+ # Note that we pass a different directory below due to bugs in the makefile!
+ econf \
+ --localstatedir=/var \
+ $(use_enable ssl tls)
+}
+
+src_install () {
+ einstall localstatedir="${D}"/var/nullmailer
+
+ dodoc AUTHORS BUGS HOWTO INSTALL ChangeLog NEWS README TODO
+
+ # A small bit of sample config
+ insinto /etc/nullmailer
+ newins "${FILESDIR}"/remotes.sample-${PV} remotes
+
+ # This contains passwords, so should be secure
+ fperms 0640 /etc/nullmailer/remotes
+ fowners root:nullmail /etc/nullmailer/remotes
+
+ # daemontools stuff
+ dodir /var/nullmailer/service{,/log}
+
+ insinto /var/nullmailer/service
+ newins scripts/nullmailer.run run
+ fperms 700 /var/nullmailer/service/run
+
+ insinto /var/nullmailer/service/log
+ newins scripts/nullmailer-log.run run
+ fperms 700 /var/nullmailer/service/log/run
+
+ # usability
+ dosym /usr/sbin/sendmail usr/$(get_libdir)/sendmail
+
+ # permissions stuff
+ keepdir /var/log/nullmailer /var/nullmailer/{tmp,queue}
+ fperms 770 /var/log/nullmailer /var/nullmailer/{tmp,queue}
+ fowners nullmail:nullmail /usr/sbin/nullmailer-queue /usr/bin/mailq
+ fperms 4711 /usr/sbin/nullmailer-queue /usr/bin/mailq
+
+ newinitd "${FILESDIR}"/init.d-nullmailer-r3 nullmailer
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+ if [ ! -e "${ROOT}"/var/nullmailer/trigger ]; then
+ mkfifo "${ROOT}"/var/nullmailer/trigger
+ fi
+ chown nullmail:nullmail \
+ "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue,trigger} || die
+ chmod 770 "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue} || die
+ chmod 660 "${ROOT}"/var/nullmailer/trigger || die
+
+ # This contains passwords, so should be secure
+ chmod 0640 /etc/nullmailer/remotes || die
+ chown root:nullmail /etc/nullmailer/remotes || die
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "To create an initial setup, please do:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ fi
+ #echo
+ #elog "To start nullmailer at boot you may use either the nullmailer init.d"
+ #elog "script, or emerge sys-process/supervise-scripts, enable the"
+ #elog "svscan init.d script and create the following link:"
+ #elog "ln -fs /var/nullmailer/service /service/nullmailer"
+ #echo
+}
+
+pkg_postrm() {
+ if [[ -e "${ROOT}"/var/nullmailer/trigger ]]; then
+ rm "${ROOT}"/var/nullmailer/trigger || die
+ fi
+}
+
+pkg_config() {
+ if [ ! -s "${ROOT}"/etc/nullmailer/me ]; then
+ einfo "Setting /etc/nullmailer/me"
+ /bin/hostname --fqdn > "${ROOT}"/etc/nullmailer/me
+ fi
+ if [ ! -s "${ROOT}"/etc/nullmailer/defaultdomain ]; then
+ einfo "Setting /etc/nullmailer/defaultdomain"
+ /bin/hostname --domain > "${ROOT}"/etc/nullmailer/defaultdomain
+ fi
+}