summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2012-04-24 08:50:11 +0000
committerEray Aslan <eras@gentoo.org>2012-04-24 08:50:11 +0000
commit7513b765a61413ff417982e7d8aa561cdfad62bc (patch)
tree2ec82b83bf8b40f73b4c5c9228778b662fca9e9c /mail-mta
parentFix for bug 411179, thanks to Joakim for reporting (diff)
downloadhistorical-7513b765a61413ff417982e7d8aa561cdfad62bc.tar.gz
historical-7513b765a61413ff417982e7d8aa561cdfad62bc.tar.bz2
historical-7513b765a61413ff417982e7d8aa561cdfad62bc.zip
version bump and unblock vda USE flag
Package-Manager: portage-2.1.10.57/cvs/Linux x86_64
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/postfix/ChangeLog9
-rw-r--r--mail-mta/postfix/Manifest34
-rw-r--r--mail-mta/postfix/postfix-2.10_pre20120423.ebuild (renamed from mail-mta/postfix/postfix-2.10_pre20120422.ebuild)9
-rw-r--r--mail-mta/postfix/postfix-2.9.1-r2.ebuild314
4 files changed, 344 insertions, 22 deletions
diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog
index 9789c09bed23..e5fd7f3d8aa0 100644
--- a/mail-mta/postfix/ChangeLog
+++ b/mail-mta/postfix/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-mta/postfix
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.351 2012/04/23 14:29:31 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.352 2012/04/24 08:50:11 eras Exp $
+
+*postfix-2.10_pre20120423 (24 Apr 2012)
+*postfix-2.9.1-r2 (24 Apr 2012)
+
+ 24 Apr 2012; Eray Aslan <eras@gentoo.org> +postfix-2.9.1-r2.ebuild,
+ -postfix-2.10_pre20120422.ebuild, +postfix-2.10_pre20120423.ebuild:
+ version bump and unblock vda USE flag
*postfix-2.10_pre20120422 (23 Apr 2012)
diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest
index c8d6890c985a..09652aff84c5 100644
--- a/mail-mta/postfix/Manifest
+++ b/mail-mta/postfix/Manifest
@@ -7,7 +7,7 @@ AUX postfix.rc6.2.7 2217 RMD160 0f46f7fe1fa8e2e3ec4c5461789c5f2708cd94f8 SHA1 b3
AUX postfix_no-berkdb.patch 2729 RMD160 2e80e5c446b58afe8cda35991ac3af5f3db3f7eb SHA1 8c6d8695bf347769f957a79f3320fcff8d844315 SHA256 c21e9582346c913b3033ec6d3567d0b0bd3576ad64052fed48a5cf78d7ad92fc
AUX smtp.pass 141 RMD160 799433a4ee9e9e32f20aa2d31f85f33faa2bc7e6 SHA1 e1d75aa259fa07b257a617e056662aecfd19957f SHA256 c9b3b56a8df2367cc15bc43a70304fac7ebdd7697e1d450d1bcb4bfdd3e078e9
AUX smtp.sasl 147 RMD160 8565ca413ec1a9e369be227643d3610124b34566 SHA1 565035b230d4997a207d146609336dfe643c6ed3 SHA256 0ef6a2a7846498f56b9a8879f561a51c1e3a203ba90b2991d499afa69fd85629
-DIST postfix-2.10-20120422.tar.gz 3772391 RMD160 d6f7cbc29f0c0a8d5f94ea4282cacfc2e594325e SHA1 42a7fee2a5cc1c014f3e1890f7e7bc4eee67c9e3 SHA256 be41b1c55e6500336b4a689487c4c774d4dc1f46f638ac08f32ef7618557c3f6
+DIST postfix-2.10-20120423.tar.gz 3772514 RMD160 b16400b371d88abcbc68a7b914d4dfab941943ec SHA1 d47a1ab9367f13cb81a781ef102fd9d2483b8d72 SHA256 9966b473a5b1867011d6f4d54347e9593c0d410e9f1318d7e89009917648cc60
DIST postfix-2.7.4.tar.gz 3423968 RMD160 4f3e0db43c55cd50b3fb4493dbc698ff3f343294 SHA1 c755ceb3a5ee983f3b72f08e1fffb6384b1f1865 SHA256 9bad5851e8a7c97890ee9465e7f675f7826d56361369d3e792a79eaf98ed2b11
DIST postfix-2.7.5.tar.gz 3425071 RMD160 a900ff09c0a54382a4af62b609f6ddaba17963fc SHA1 066cc87f602f2daf1d3207de92ca08de9eb16bab SHA256 2fe408f49bc8540bc41b44f1b7ee7a27561f1baa4e25ef55645778ba96d15932
DIST postfix-2.7.6.tar.gz 3425286 RMD160 9961b959ae34a1fe1d3bf70acce1f16e5ada255d SHA1 9a2cd652abdc0d3cf29563261d5c0f407d8d7bf9 SHA256 4f7546d25463c5fc300eccd05c302a44458b1cc8dfda02c7205daa0038d5ab17
@@ -22,7 +22,8 @@ DIST postfix-vda-2.7.2.patch 59667 RMD160 ebec1fa4a4c6b3c0160407b09aacf8357c9361
DIST postfix-vda-v10-2.7.8.patch 56777 RMD160 7ba4611edd5a63c9378b96043c3e9e2e8b520cfa SHA1 b1079f1a2a4d81bfb59d94ae44f888d2e7df2c02 SHA256 10738a30f2cb00cd05c593caf5b4b9d4ca44927432c1995a9db5c3557d0528db
DIST postfix-vda-v10-2.8.5.patch 56777 RMD160 fc1622a91c88d6d91782b9d4e9dfecd3f603251b SHA1 b9f8480a738dccf0023698274c8d5f5cb4fb308f SHA256 0106e0bfdea8bb3888e8f33e7cb4b1530d171abbf2d3ac91567f91240e4b6b5a
DIST postfix-vda-v10-2.8.8.patch 56777 RMD160 960d5b2e6ff45ae376ba9e98ab74ec712badfcd3 SHA1 9bfbbb6278301ac11082c9a9e685ad6e90b24e6a SHA256 40e32a1c159fe3d12836f81e4871e4a628a87623b80402e90f7465eb39f89a86
-EBUILD postfix-2.10_pre20120422.ebuild 9499 RMD160 bbe8f7e524d4bd66f766cbda0893386f3e5c6cc8 SHA1 4136b1d9961315125cecf0b96a8ca0c99fec76a1 SHA256 1e2b5c25f43bc779d9a647ed33500f657147e787695073e4ce25e542f40317b0
+DIST postfix-vda-v11-2.9.1.patch 55009 RMD160 fc35876f4c48accca785f412a4d9a2f1a250f05d SHA1 f259c489d76271ac1780510e20a60962f97ac36f SHA256 611283a932577944bcdde36e5fe1a80ca750a0a66eb5f3490666e2adafd2bf84
+EBUILD postfix-2.10_pre20120423.ebuild 9493 RMD160 a60dcc19faf33c5d4b00ab0bcf0bc626533595b5 SHA1 2983f8146df6b826c6b5f7cb76abdbbeb488e248 SHA256 220e930d9515bef2954cca6fcb28f598e659e557d7ea67e2236072e61f175ac6
EBUILD postfix-2.7.4.ebuild 7562 RMD160 7b1874aa1c5fb0357ab8bafd740e38ec00ecdb45 SHA1 db22462d85927f3afc7c172597842d1fc0ac5fb5 SHA256 aaa33b10ecc21d9dcd8256b12974912bf3481544c5f7cb5119da7b52fcefc9d9
EBUILD postfix-2.7.5.ebuild 7573 RMD160 767bf6a470af95a14e1e725fc77287d3f3907ffd SHA1 2f897791234a3c2bfbcb3fe39406c60e2f7e9b09 SHA256 b348d000438cae031fa48e04a938aa623dd722120699a9969cccc99d05842122
EBUILD postfix-2.7.6.ebuild 7573 RMD160 6e8c3b59101d7d4d19f20f0df24b5f53d2a23957 SHA1 f703ec9a31a1a6a2e3930fbd7660f998d1753c27 SHA256 7ade993dbeba99be1ab0f97d35227fbb0d208f70e4a718bf3d2a56bc4983f512
@@ -34,23 +35,24 @@ EBUILD postfix-2.8.9.ebuild 8433 RMD160 1c2edff066c7f7004bc49b9ef3e042fc9b422dfa
EBUILD postfix-2.9.0-r1.ebuild 9557 RMD160 97300e05fc507d1b90146f2c6cb1f45f2c7bc5db SHA1 df1669c2af777951a244dbb7f60f36f529ee169f SHA256 21b0fdad4a7a065e20dd39bd2b75bfc4da2c066bd76558a304fd2114ed4c81a7
EBUILD postfix-2.9.0.ebuild 9554 RMD160 6077663c5d24ee7b97069befd5e37833e8f10f9a SHA1 41777f9b4f2120c6f99ab0ea26866f65c1321e14 SHA256 a5f517184ac04843bf5c09fc4a76d8b8ecde981b6af463f598a48262bc86bced
EBUILD postfix-2.9.1-r1.ebuild 9486 RMD160 2baf0a5140341786224ebc8291dec8e12ca1ace8 SHA1 fbb0ba50d18be72af585b3934c2c4997a7d8e420 SHA256 47ea713d208c2e7cd60c08da408753120c975785d9bcd829fb621e14d3057ab2
+EBUILD postfix-2.9.1-r2.ebuild 9486 RMD160 2bebe35abb021215bb7e1059adfd8a3606eb2ae0 SHA1 024366b88745bc0e0369e9d9109c1ffe13625c4d SHA256 a7faf6a24e06ae0950996b831b39aa6da7efa21bf2c6760b0411df3ca44692ff
EBUILD postfix-2.9.1.ebuild 9483 RMD160 e7a7abdcd7d31603b1e4d298a10d368cd7b708fb SHA1 ddce969d04456765884478e255d0157e9963046f SHA256 4403a43db499e7dff8c6faf9df62e042a323a7aeaf6ba2c7d3f3f19e99863f84
-MISC ChangeLog 80092 RMD160 e9085536aa7db17ddcc9073624439081d7cbfa2a SHA1 28874eb7f1be6c7257b01d7f2c234cfe3d1908c1 SHA256 b9bcf906f7bac8aeadb070f5dff586cbb610adc774d42246e8e1e1635f79dbf2
+MISC ChangeLog 80346 RMD160 85255a49fe34336ceaeb670ed7d0746a664bd209 SHA1 5a3c54f2b7d1f5ee68843f7bbb49204b6f333874 SHA256 6ad95aa0b2e0387b9cfe4064d390eaf9c4e5b6eaecdcf4a19924d6624aa0c6e2
MISC metadata.xml 610 RMD160 095d8cd529350f58c64d6d2eb40e8534d3dddfae SHA1 d53048933e7490f3f342ccf8972c191ee8030ccd SHA256 00b7ef524664b20a9df7642573745b1d17b0b51f005ffd150ac6dccba38dee88
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQIcBAEBCAAGBQJPlWdaAAoJEHfx8XVYajsf6RQP/ilCY/uklQqraJiQrC8YRXMp
-Tam2BWjU5eIqm3PlSO/5fGwQ4i83ScmPUizDfQvbLeXtoXiAaY04Sk3cTuZE6NDH
-fNT5RTwAUVkYcCCH7VUHwAlID++VhnVFNBpFjdgSst+ZQ5A2xVyKLTD3dmr94EMn
-Z0JsrYClN1bS1sZ3AwoY8hedyGa5NgVcFqx9WSMni+SuDp00H8wVq3S3PWe0AEOb
-+p0zwRnRZQe+EqclNCIpfpCXI6ntM1bIwDKtHYmX4lM20OJx2bqHRQixTJc92+1x
-66hpiQVa/8KftRKo6QDRP94NwAFKeDR8zAsNjJB/Y1H9ptAgUSnnoeR43KUF5/iw
-lSMnA1rkYsphpX39LeAcsSt1497+sr8sweLSQxXIjmdoz2NTQDwFUiIbB6E/1sO0
-cFkCRK8Y4VZYSgO+z7wbqj25oV9UuSVlEIyI2TM55GyvhBp9P2gdusFL4tEElHfz
-nwWmqSBfJr47sknCIj9Qbj1z7C3hwn8egPc8WWVT7g3BQ0cbERc5lYXBfEChFokn
-iY1CLm8Alj7CaQrgqyzg9Ioeb5fGTn7/Hb96qL9tbo1T1OpMbUOa1jS++iGoD+fN
-cZc/511hCxQH+azFO4vWIkv8iCSRwNvP2nuS3eYntmPCx3Ex+6lJn2YYDkgr2Zy0
-DBAYID1nwHsGMYOvWqS9
-=j3Af
+iQIcBAEBCAAGBQJPlmlTAAoJEHfx8XVYajsfwxEQAJosGClbEiAJx8nUDwlEzaVp
+/PEJRjw6ialeUl6ZOsJCGyUutXljwRX67tHNZCDsYQf9szPAz8kI6++tGXWHVcGe
+XTNxM0N224aNofl2XAvrX8BG8kM8moTPkfN0cnU8wwtX/WBgFFzrE3bG2zruhL/x
+XDVprhbCRQj3boBWGhIp/SsWvCYNkDqESlMgNvaa4AYfZbjx0k/Nqt5LK6PdHjDm
+e34xtBP17avjaWMToOjqA2hMurz3plhb13IGNhXeIBkUJcnM7fLmM/ihhRla93I2
+URWRNoqPcjHhYN9AITycf/NjdAWMiL8RCX++vZ/Ds+NYzENv3J8Dm95mdohCgOIi
+8Ii/mdeNu+gRttDDDRvX7u8nNnuIdV/LiqX+GKgw9JLf67ZNC6nRRXhJ7sVHNldD
+zMXWYl9mXiSetYi+znQpDpvxOyn8h+bKkkxapmDXJrKffF/5QrVyGAYVU7MVgCw4
+6ebjCjHZo199m6q77+53ES6KURVphoklvuYz8RPBcjgrrzLCtiW0Zkp7BaViSQC3
+h9lxdDm0VUHqE3/AyxiLn7ON4/wsgBCtYtd9nr9MTfd7Cho25nZJDcQgrrcLkS1z
+s25dSUPg3+z+bnb+cO7Yn5lRS+zNCg1jDFusfg1H1OMPsiOE/s9B+3C6HM1gTA6x
+Q+Iyj/2GaFk5k4cb09l1
+=e6Qe
-----END PGP SIGNATURE-----
diff --git a/mail-mta/postfix/postfix-2.10_pre20120422.ebuild b/mail-mta/postfix/postfix-2.10_pre20120423.ebuild
index 1dda90449696..fd3f80f26fb8 100644
--- a/mail-mta/postfix/postfix-2.10_pre20120422.ebuild
+++ b/mail-mta/postfix/postfix-2.10_pre20120423.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20120422.ebuild,v 1.1 2012/04/23 14:29:31 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20120423.ebuild,v 1.1 2012/04/24 08:50:11 eras Exp $
EAPI=4
@@ -9,8 +9,8 @@ inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam versionator
MY_PV="${PV/_pre/-}"
MY_SRC="${PN}-${MY_PV}"
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental"
-VDA_PV="2.8.8"
-VDA_P="${PN}-vda-v10-${VDA_PV}"
+VDA_PV="2.9.1"
+VDA_P="${PN}-vda-v11-${VDA_PV}"
RC_VER="2.7"
DESCRIPTION="A fast and secure drop-in replacement for sendmail."
@@ -56,8 +56,7 @@ RDEPEND="${DEPEND}
!net-mail/fastforward"
# vda patch is broken for 2.10
-REQUIRED_USE="ldap-bind? ( ldap sasl )
- !vda"
+REQUIRED_USE="ldap-bind? ( ldap sasl )"
S="${WORKDIR}/${MY_SRC}"
diff --git a/mail-mta/postfix/postfix-2.9.1-r2.ebuild b/mail-mta/postfix/postfix-2.9.1-r2.ebuild
new file mode 100644
index 000000000000..27d115617bfe
--- /dev/null
+++ b/mail-mta/postfix/postfix-2.9.1-r2.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.9.1-r2.ebuild,v 1.1 2012/04/24 08:50:11 eras Exp $
+
+EAPI=4
+
+inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam versionator
+
+MY_PV="${PV/_rc/-RC}"
+MY_SRC="${PN}-${MY_PV}"
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
+VDA_PV="2.9.1"
+VDA_P="${PN}-vda-v11-${VDA_PV}"
+RC_VER="2.7"
+
+DESCRIPTION="A fast and secure drop-in replacement for sendmail."
+HOMEPAGE="http://www.postfix.org/"
+SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
+ vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
+
+LICENSE="IBM"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
+
+DEPEND=">=dev-libs/libpcre-3.4
+ dev-lang/perl
+ berkdb? ( >=sys-libs/db-3.2 )
+ cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
+ ldap? ( net-nds/openldap )
+ ldap-bind? ( net-nds/openldap[sasl] )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )
+ sqlite? ( dev-db/sqlite:3 )
+ ssl? ( >=dev-libs/openssl-0.9.6g )"
+
+RDEPEND="${DEPEND}
+ dovecot-sasl? ( net-mail/dovecot )
+ memcached? ( net-misc/memcached )
+ net-mail/mailbase
+ selinux? ( sec-policy/selinux-postfix )
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta]
+ !mail-mta/nbsmtp
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !<mail-mta/ssmtp-2.64-r2
+ !>=mail-mta/ssmtp-2.64-r2[mta]
+ !net-mail/fastforward"
+
+# vda patch is broken in 2.9
+REQUIRED_USE="ldap-bind? ( ldap sasl )
+ !vda"
+
+S="${WORKDIR}/${MY_SRC}"
+
+pkg_setup() {
+ # Add postfix, postdrop user/group (bug #77565)
+ enewgroup postfix 207
+ enewgroup postdrop 208
+ enewuser postfix 207 -1 /var/spool/postfix postfix,mail
+}
+
+src_prepare() {
+ if use vda; then
+ epatch "${DISTDIR}"/${VDA_P}.patch
+ fi
+
+ if ! use berkdb; then
+ epatch "${FILESDIR}/${PN}_no-berkdb.patch"
+ fi
+
+ sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
+ src/util/sys_defs.h || die "sed failed"
+
+ # change default paths to better comply with portage standard paths
+ sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
+}
+
+src_configure() {
+ # Make sure LDFLAGS get passed down to the executables.
+ local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
+
+ use pam && mylibs="${mylibs} -lpam"
+
+ if use ldap; then
+ mycc="${mycc} -DHAS_LDAP"
+ mylibs="${mylibs} -lldap -llber"
+ fi
+
+ if use mysql; then
+ mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
+ mylibs="${mylibs} $(mysql_config --libs)"
+ fi
+
+ if use postgres; then
+ mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
+ mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
+ fi
+
+ if use sqlite; then
+ mycc="${mycc} -DHAS_SQLITE"
+ mylibs="${mylibs} -lsqlite3"
+ fi
+
+ if use ssl; then
+ mycc="${mycc} -DUSE_TLS"
+ mylibs="${mylibs} -lssl -lcrypto"
+ fi
+
+ # broken. and "in other words, not supported" by upstream.
+ # Use inet_protocols setting in main.cf
+ #if ! use ipv6; then
+ # mycc="${mycc} -DNO_IPV6"
+ #fi
+
+ if use sasl; then
+ if use dovecot-sasl; then
+ # Set dovecot as default.
+ mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
+ fi
+ if use ldap-bind; then
+ mycc="${mycc} -DUSE_LDAP_SASL"
+ fi
+ mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
+ mylibs="${mylibs} -lsasl2"
+ elif use dovecot-sasl; then
+ mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
+ fi
+
+ if ! use nis; then
+ sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
+ src/util/sys_defs.h || die "sed failed"
+ fi
+
+ if ! use berkdb; then
+ mycc="${mycc} -DNO_DB"
+ if use cdb; then
+ # change default hash format from Berkeley DB to cdb
+ sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die
+ fi
+ fi
+
+ if use cdb; then
+ mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
+ CDB_LIBS=""
+ # Tinycdb is preferred.
+ if has_version dev-db/tinycdb ; then
+ einfo "Building with dev-db/tinycdb"
+ CDB_LIBS="-lcdb"
+ else
+ einfo "Building with dev-db/cdb"
+ CDB_PATH="/usr/$(get_libdir)"
+ for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
+ CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
+ done
+ fi
+ mylibs="${mylibs} ${CDB_LIBS}"
+ fi
+
+ # Robin H. Johnson <robbat2@gentoo.org> 17/Nov/2006
+ # Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
+ mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
+ filter-lfs-flags
+
+ # Workaround for bug #76512
+ if use hardened; then
+ [[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
+ fi
+
+ # Remove annoying C++ comment style warnings - bug #378099
+ append-flags -Wno-comment
+
+ emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
+}
+
+src_install () {
+ /bin/sh postfix-install \
+ -non-interactive \
+ install_root="${D}" \
+ config_directory="/etc/postfix" \
+ manpage_directory="/usr/share/man" \
+ readme_directory="/usr/share/doc/${PF}/readme" \
+ html_directory="/usr/share/doc/${PF}/html" \
+ command_directory="/usr/sbin" \
+ mailq_path="/usr/bin/mailq" \
+ newaliases_path="/usr/bin/newaliases" \
+ sendmail_path="/usr/sbin/sendmail" \
+ || die "postfix-install failed"
+
+ # Fix spool removal on upgrade
+ rm -Rf "${D}"/var
+ keepdir /var/spool/postfix
+
+ # Install rmail for UUCP, closes bug #19127
+ dobin auxiliary/rmail/rmail
+
+ # Provide another link for legacy FSH
+ dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
+
+ # Install qshape tool
+ dobin auxiliary/qshape/qshape.pl
+ doman man/man1/qshape.1
+
+ # Performance tuning tools and their manuals
+ dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
+ doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
+
+ # Set proper permissions on required files/directories
+ dodir /var/lib/postfix
+ keepdir /var/lib/postfix
+ fowners -R postfix:postfix /var/lib/postfix
+ fperms 0750 /var/lib/postfix
+ fowners root:postdrop /usr/sbin/post{drop,queue}
+ fperms 02711 /usr/sbin/post{drop,queue}
+
+ keepdir /etc/postfix
+ if use mbox; then
+ mypostconf="mail_spool_directory=/var/spool/mail"
+ else
+ mypostconf="home_mailbox=.maildir/"
+ fi
+ "${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
+ -e ${mypostconf} || die "postconf failed"
+
+ insinto /etc/postfix
+ newins "${FILESDIR}"/smtp.pass saslpass
+ fperms 600 /etc/postfix/saslpass
+
+ newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
+ # do not start mysql/postgres unnecessarily - bug #359913
+ use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
+ use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
+
+ mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
+ mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
+
+ dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
+
+ pamd_mimic_system smtp auth account
+
+ if use sasl; then
+ insinto /etc/sasl2
+ newins "${FILESDIR}"/smtp.sasl smtpd.conf
+ fi
+
+ # header files
+ insinto /usr/include/postfix
+ doins include/*.h
+
+ # Remove unnecessary files
+ rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
+ rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
+}
+
+pkg_preinst() {
+ # default for inet_protocols changed from ipv4 to all in postfix-2.9.
+ # check inet_protocols setting in main.cf and modify if necessary to prevent
+ # performance loss with useless DNS lookups and useless connection attempts.
+ [[ -d ${ROOT}/etc/postfix ]] && {
+ if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then
+ if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -nh inet_protocols)" ]];
+ then
+ ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf."
+ ewarn "That will keep the same behaviour as previous postfix versions."
+ ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n"
+ else
+ # delete inet_protocols setting. there is already one in /etc/postfix
+ sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die
+ fi
+ fi
+ }
+}
+
+pkg_postinst() {
+ # Do not install server.{key,pem) SSL certificates if they already exist
+ if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
+ && ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
+ install_cert /etc/ssl/postfix/server
+ chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
+ fi
+
+ if [[ ! -e /etc/mail/aliases.db ]] ; then
+ ewarn
+ ewarn "You must edit /etc/mail/aliases to suit your needs"
+ ewarn "and then run /usr/bin/newaliases. Postfix will not"
+ ewarn "work correctly without it."
+ ewarn
+ fi
+
+ if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then
+ elog "If you are using old style postfix instances by symlinking"
+ elog "startup scripts in ${ROOT}etc/init.d, please consider"
+ elog "upgrading your config for postmulti support. For more info:"
+ elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
+ if ! use berkdb; then
+ ewarn "\nPostfix is installed without BerkeleyDB support."
+ ewarn "Please turn on berkdb USE flag for hash or btree table"
+ ewarn "lookup support.\n"
+ fi
+ ewarn "Postfix daemons now live under /usr/libexec/postfix"
+ ewarn "Please adjust your main.cf accordingly by running"
+ ewarn "etc-update/dispatch-conf or similar and accepting the new"
+ ewarn "daemon_directory setting."
+ fi
+}