version bump
authorEray Aslan <eras@gentoo.org>
Mon, 24 Oct 2011 12:56:19 +0000 (12:56 +0000)
committerEray Aslan <eras@gentoo.org>
Mon, 24 Oct 2011 12:56:19 +0000 (12:56 +0000)
Package-Manager: portage-2.1.10.31/cvs/Linux x86_64

mail-mta/postfix/ChangeLog
mail-mta/postfix/Manifest
mail-mta/postfix/postfix-2.7.7.ebuild [new file with mode: 0644]
mail-mta/postfix/postfix-2.8.6.ebuild [new file with mode: 0644]

index 5466a92ceba923601efe0ae2b959456ec42a67c3..4c79d6ddef928fd60e829622d08a21432b365ad2 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for mail-mta/postfix
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.292 2011/10/24 12:52:32 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.293 2011/10/24 12:56:19 eras Exp $
+
+*postfix-2.8.6 (24 Oct 2011)
+*postfix-2.7.7 (24 Oct 2011)
+
+  24 Oct 2011; Eray Aslan <eras@gentoo.org> +postfix-2.7.7.ebuild,
+  +postfix-2.8.6.ebuild:
+  version bump
 
   24 Oct 2011; Eray Aslan <eras@gentoo.org> files/postfix.rc6.2.5,
   files/postfix.rc6.2.6:
index f5767e179437c01d1dc3cf73e65f3cb7888a9bf9..43b433f7522e64d6ab3e9cd655888133ca0e8ab4 100644 (file)
@@ -8,9 +8,11 @@ AUX smtp.sasl 147 RMD160 8565ca413ec1a9e369be227643d3610124b34566 SHA1 565035b23
 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
+DIST postfix-2.7.7.tar.gz 3425665 RMD160 08edab5dabb4b54e3b3f903df51a93e4718e561c SHA1 5e50b20d6ca14a73ea391955a2c6f65e4b01cb72 SHA256 3e4a6f6ffd55ce8f2f535f9ce2f50090526c9710d0aed888fed151b2cabef605
 DIST postfix-2.8.3.tar.gz 3645105 RMD160 9312cb25c352cc3613efed48e0a3b83f7f5fcba5 SHA1 2604066f158f5327449960afd6334b996dc01799 SHA256 288267caede6ea1c4f155855395aa957998909a4968af431b8057062f7d60b49
 DIST postfix-2.8.4.tar.gz 3646391 RMD160 fbeb785c5ed08febf5cf71ea375b10120c1f62b6 SHA1 48d077ad2614098f39411cb965a74d8ce2f3e5be SHA256 979a85b06de1a85be121bfb685e590da9a1441b08b16a89a5e4abc7f1de29df5
 DIST postfix-2.8.5.tar.gz 3647010 RMD160 db4761f14b146c233426fa1afe49782e64f0c9e0 SHA1 49ef711c80b5a3434258ab24ae00940932503e80 SHA256 f8ed6c98bf5058c363da936a8034c64cee38ca67110e9212491de862116e1c17
+DIST postfix-2.8.6.tar.gz 3647498 RMD160 1f85ff0e9432109342436144f6963d39b79910e1 SHA1 32613ad01cad10ae04aad626f9a69ac9126b3d28 SHA256 8b427a5dfe95da98918fcafce4032bac5d6190603fbc090da3c5c3a22c74dae5
 DIST postfix-2.9-20111012.tar.gz 3673596 RMD160 372cf5c24dc31ccc7c44a2954d0b431bccf09f10 SHA1 be977a8c730cfb05be317c65edabb0b0b7b39bca SHA256 fb3d55c8a16c687bcee7e7a26a84c69e8765cc19ba7ab47620e7ac6b19efd3be
 DIST postfix-vda-2.7.2.patch 59667 RMD160 ebec1fa4a4c6b3c0160407b09aacf8357c936148 SHA1 ac712922f45856965118fa7b8551ece1ccb524db SHA256 f9b12376983833ef9305f7696e9792b62058f242ff2630aeb0866cf686f0a14b
 DIST postfix-vda-v10-2.8.1.patch 56777 RMD160 42f6351d645cc7a211aea86cc35e1f3b10b50da1 SHA1 6b36480be036e7b7aa834fd904a2aa57c537cd40 SHA256 13ca7430b68dc19e21ee26c1c1109e1527a656777fa2f224cd3ce2d594435f12
@@ -18,28 +20,30 @@ DIST postfix-vda-v10-2.8.3.patch 56777 RMD160 ce30005d590d884c589612e65dbd34cbdb
 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
+EBUILD postfix-2.7.7.ebuild 7573 RMD160 cda7e8659a726c4a7e12b76ada5711ceb952c18b SHA1 f535fa064dae10a4fd1e16df45502c6038f3cc70 SHA256 8a8ac46dffbb9fdbcbe6315bc2af491cf2dc46db426ee8a9c8428b24a72dbec1
 EBUILD postfix-2.8.3-r1.ebuild 8252 RMD160 249d9b11ba39e838eef310ef433b53c76e9a7114 SHA1 0cd5057a5d3e0faf84a988c3f1cc6a3e7a90e514 SHA256 a6a4a02c2916f90ca235b48b2bacd31a1a10533ee282fa322f7c74de97679628
 EBUILD postfix-2.8.3-r2.ebuild 8480 RMD160 deeca4c662a0ad03820189413bd1f3535e5ad8e6 SHA1 37dd20dd7370809196293d5ae91801a3bd7b5a5e SHA256 d6d6389cd4a3ad037d504aeeb776b2bd5ad2ff654c552ac17b2b125240837814
 EBUILD postfix-2.8.3.ebuild 7704 RMD160 590648d5f04f26f2e1174e884ec00354f9f4e01a SHA1 ec16001d814ccd3f52c34ec3e6282effe5528fd0 SHA256 79fd90c4dcccb69269f1e528886500849714c755dd81038a38b852d2b7745744
 EBUILD postfix-2.8.4.ebuild 8427 RMD160 b1dcc810141c23f572de3074d1279ce8c2767761 SHA1 2751cabc9c0bf205c91759c86fa874154cfd9098 SHA256 abd92ec558e96a22d2abb7528baa1558e432174a8bdcff0182810a1d819d6596
 EBUILD postfix-2.8.5.ebuild 8440 RMD160 8f8529637f854ca90160eab32785b33015dfcaf3 SHA1 268a3cc82863f98e284cdca16660e27566436c14 SHA256 ea2318bbd45256a894645f798e1c3a59a4ba9ad2dd09bde9206519f402dc5891
+EBUILD postfix-2.8.6.ebuild 8423 RMD160 0e17349a55210ac640dfbbe65a4fdb57350dc1fb SHA1 47c5ec60cd17d1e605958b955c2735a587d497a7 SHA256 3e152e0de7892eccde44d7940190de058fa8e9ee5dc3fc1f7e7bd9dcab29653c
 EBUILD postfix-2.9_pre20111012.ebuild 8917 RMD160 90704b7b6deafbadaa026bd21bd1903bf2894c45 SHA1 df831ff6beb6a0af33e82f08a8f45f1f5914207f SHA256 8d5bc974a481b758c68206a26398fded21beb707822882512be3aaf40895fa5b
-MISC ChangeLog 70139 RMD160 34793b7f5554ecd53f1b578d354acd7824e090e0 SHA1 2964da6e7c97505ea24acdd7b76d19116d3c6786 SHA256 d6b4c5e8dd8ff24b4d2e09a15264de8547cb9e44da24af65056c2ee5d3f5bf4d
+MISC ChangeLog 70306 RMD160 e44677b7ced8ddc9c5541c5fd9e85f5cae204bb4 SHA1 60497c6a315b8c7df333d7b837f712dee66794aa SHA256 7583847f690ecafd30101f1f7544dd0e5f5311d41b2e23b5f7be8dcc75329462
 MISC metadata.xml 501 RMD160 faf5708865464f36ec686bb58b2474e2a5a1fb53 SHA1 f5d83c47e3edc4a6c337d4bb905eb4917dc0d417 SHA256 7a46203782ad8363c75a53faa35a434e20f879a7f23f624388ce248ea8bb55a0
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iQIcBAEBCAAGBQJOpV+eAAoJEHfx8XVYajsfNu4QAIrMdac/cWbK5Ls/+cjppERF
-khCPJZvcHzi/Og7r+d4qxCEb6TGjYp54/biN0NTgH4yXpyp6KAxEzeie0sTha9tj
-0GcYtcwEe5Ap6YwQN1lKsHR9GddAu8AZw+Z8EhhlBsVs71gCFtAkWkaVutf86I4i
-5AllYEsNNdK0PptRoEFGvLfUgQGI70fvlDK2D79ZiDDy3tRJC3FSfYgCVSDild9H
-0VFkRv+jUBzwrXwYe8Lz/t/befUW9hYooaSxi6yfiVBKpGd15iL1A8R1Jy32LW8S
-Erdh18smYTe74mpgBZC2KZE0fkTP5F9qbNJO2ZnexSbz6/0M62HDTzy0XeS1ekf5
-9KStx1pW7WPySLvLSKnk5WePVFF2y+z5lH/r5nGuL8ewJgcB0diolX1pjXf47ys8
-X6CnAMLQChNVUGx/48yKw7PEzrekuDgkCNXRo2VVynbhubILjdJj8B6nmdjabUf0
-g7UYf9O943hcnO7Y8PwFp6meXdja/SPyy3I3sOe42qgkaFRk7z6bHgwcZGaHh+e2
-C1qoIkEtQboTveci5Azr/OeRNcui6sJCnnIKsTWgaNZtxe73ZwgfRDNNlMp8OMun
-GWwPrypaX630+RrMHzjemkHSIw7Gbg2sDrBIvgXgU61aNcc5+fWfEuo7TMqse3aG
-n74VTEsm5mGHFrStq4bt
-=QyKx
+iQIcBAEBCAAGBQJOpWB5AAoJEHfx8XVYajsf1tIQAK+pNMbhx6/oQi0lVEMMuzEb
+vtZuyMDyVziPGu+LBlNgg5SZmZn3nvs52IxmbgrN0DVe7i2RMySiqvBSmmCB0Pky
+T5IxylwQUqyh5NaE/4IRwqIbWdL0xQY+iI/foLwrC8CzOVg1CPVYfESy40xr83m4
+0D1bSF8gGa0ShZcrdHlLvsQ/tJQcYxfoHGMUYOlbr1wtRJNgZGXTEhS584VsB+/9
+lMp9AAqEvGUyCRpwXxlRrda9cf1Bud8oTDwwuAcGTmWD0fWyqcFaSKsBhMAAtH6+
+pm8Bf0aLlG9DcItz2sNXHUWSLHdMd65xNEZPLUgHLH+8BAZFxrwWtYNjkdcvdNrq
+zwzISgHBrVY1Z7JRyMDdTaMLFRFXzlSXkFB6fubxpOD6edr5EMERFgb76jUaq681
+KjvAR7lJuoUKWDq/ST6QUzKXAHZctRGtgw28VeRucZ3Ra9kHiLyf4/E4bCHaUFVH
+dJtwhM90/irkCd+akfaEqTRcJZP9RWyUV4fzca4ceUt9vcV3a+wG7/qwsB/9oAbu
+mDi7J8mgbLMTYsFwlLdg8hwhYHa9S6/N35c6Ccwl9EMZlPtThrj+TiTAUjmMzVex
+E44q7EXmAjgKOcqYMGxV3Q2tDcIOD5iSw8SuiND2VFbsFLOevscNA2fNKxC/2yXN
+JXyaPzRseP5OYC+V2oCj
+=NKIo
 -----END PGP SIGNATURE-----
diff --git a/mail-mta/postfix/postfix-2.7.7.ebuild b/mail-mta/postfix/postfix-2.7.7.ebuild
new file mode 100644 (file)
index 0000000..899441f
--- /dev/null
@@ -0,0 +1,264 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.7.7.ebuild,v 1.1 2011/10/24 12:56:19 eras Exp $
+
+EAPI=3
+
+inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
+
+MY_PV="${PV/_rc/-RC}"
+MY_SRC="${PN}-${MY_PV}"
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
+VDA_PV="2.7.2"
+VDA_P="${PN}-vda-${VDA_PV}"
+RC_VER="2.5"
+
+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 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="cdb doc dovecot-sasl examples hardened ipv6 ldap mbox mysql nis pam postgres sasl selinux ssl vda"
+
+DEPEND=">=sys-libs/db-3.2
+       >=dev-libs/libpcre-3.4
+       cdb? ( || ( >=dev-db/cdb-0.75-r1 >=dev-db/tinycdb-0.76 ) )
+       ldap? ( >=net-nds/openldap-1.2 )
+       mysql? ( virtual/mysql )
+       pam? ( virtual/pam )
+       postgres? ( dev-db/postgresql-base )
+       sasl? (  >=dev-libs/cyrus-sasl-2 )
+       ssl? ( >=dev-libs/openssl-0.9.6g )"
+
+RDEPEND="${DEPEND}
+       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"
+
+S="${WORKDIR}/${MY_SRC}"
+
+group_user_check() {
+       einfo "Checking for postfix group ..."
+       enewgroup postfix 207
+       einfo "Checking for postdrop group ..."
+       enewgroup postdrop 208
+       einfo "Checking for postfix user ..."
+       enewuser postfix 207 -1 /var/spool/postfix postfix,mail
+}
+
+pkg_setup() {
+       # Add postfix, postdrop user/group (bug #77565)
+       group_user_check || die "Failed to check/add needed user/group"
+}
+
+src_prepare() {
+       if use vda ; then
+               epatch "${DISTDIR}"/${VDA_P}.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 ssl ; then
+               mycc="${mycc} -DUSE_TLS"
+               mylibs="${mylibs} -lssl -lcrypto"
+       fi
+
+       if use sasl ; then
+               if use dovecot-sasl ; then
+                       # Set dovecot as default.
+                       mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
+               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 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
+
+       mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
+
+       # 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
+
+       emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \
+               makefiles || die "configure problem"
+}
+
+src_install () {
+       local myconf
+       use doc && myconf="readme_directory=\"/usr/share/doc/${PF}/readme\" \
+               html_directory=\"/usr/share/doc/${PF}/html\""
+
+       /bin/sh postfix-install \
+               -non-interactive \
+               install_root="${D}" \
+               config_directory="/usr/share/doc/${PF}/defaults" \
+               manpage_directory="/usr/share/man" \
+               ${myconf} \
+               || 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 postfix:postfix /var/lib/postfix
+       fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
+       fperms 0750 /var/lib/postfix
+       fowners root:postdrop /usr/sbin/post{drop,queue}
+       fperms 02711 /usr/sbin/post{drop,queue}
+
+       keepdir /etc/postfix
+       mv "${D}"/usr/share/doc/${PF}/defaults/*.cf "${D}"/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 || die "newinitd failed"
+
+       use examples && mv "${S}"/examples "${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
+
+       # Remove unnecessary files
+       rm -f "${D}"/usr/$(get_libdir)/postfix/*.cf
+}
+
+pkg_postinst() {
+       # Add postfix, postdrop user/group (bug #77565)
+       group_user_check || die "Failed to check/add needed user/group"
+
+       # 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
+
+       ebegin "Fixing queue directories and permissions"
+       "${ROOT}"/usr/$(get_libdir)/postfix/post-install upgrade-permissions \
+               daemon_directory="${ROOT}/usr/$(get_libdir)/postfix"
+
+       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 [[ -e /etc/mailer.conf ]] ; then
+               einfo
+               einfo "mailwrapper support is discontinued."
+               einfo "You may want to 'emerge -C mailwrapper' now."
+               einfo
+       fi
+
+       elog
+       elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
+       elog "for incompatibilities and other major changes between releases."
+       elog
+}
diff --git a/mail-mta/postfix/postfix-2.8.6.ebuild b/mail-mta/postfix/postfix-2.8.6.ebuild
new file mode 100644 (file)
index 0000000..0afdf69
--- /dev/null
@@ -0,0 +1,279 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.8.6.ebuild,v 1.1 2011/10/24 12:56:19 eras Exp $
+
+EAPI=4
+
+inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
+
+MY_PV="${PV/_rc/-RC}"
+MY_SRC="${PN}-${MY_PV}"
+MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official"
+VDA_PV="2.8.3"
+VDA_P="${PN}-vda-v10-${VDA_PV}"
+RC_VER="2.5"
+
+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 ~sparc ~x86 ~x86-fbsd"
+IUSE="cdb doc dovecot-sasl hardened ipv6 ldap ldap-bind mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
+
+DEPEND=">=sys-libs/db-3.2
+       >=dev-libs/libpcre-3.4
+       dev-lang/perl
+       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 )
+       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"
+
+REQUIRED_USE="ldap-bind? ( ldap sasl )"
+
+S="${WORKDIR}/${MY_SRC}"
+
+group_user_check() {
+       einfo "Checking for postfix group ..."
+       enewgroup postfix 207
+       einfo "Checking for postdrop group ..."
+       enewgroup postdrop 208
+       einfo "Checking for postfix user ..."
+       enewuser postfix 207 -1 /var/spool/postfix postfix,mail
+}
+
+pkg_setup() {
+       # Add postfix, postdrop user/group (bug #77565)
+       group_user_check || die "Failed to check/add needed user/group"
+}
+
+src_prepare() {
+       if use vda ; then
+               epatch "${DISTDIR}"/${VDA_P}.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
+
+       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 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
+
+       mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
+       mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
+       mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\""
+       mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\""
+       mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\""
+       mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\""
+       mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
+       mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
+       mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
+       mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\""
+       mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\""
+       mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\""
+       mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\""
+
+       # 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
+
+       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" \
+               daemon_directory="/usr/$(get_libdir)/postfix" \
+               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 postfix:postfix /var/lib/postfix
+       fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
+       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
+       # 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"
+
+       dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
+
+       mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
+       mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
+
+       pamd_mimic_system smtp auth account
+
+       if use sasl ; then
+               insinto /etc/sasl2
+               newins "${FILESDIR}"/smtp.sasl smtpd.conf
+       fi
+
+       # Remove unnecessary files
+       rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
+       rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
+}
+
+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
+
+       elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}"
+       elog "for incompatibilities and other major changes between releases."
+}