From c66ab9a0a10a80f1bb2646802e7d57cf852ab83a Mon Sep 17 00:00:00 2001 From: Eray Aslan Date: Tue, 6 Dec 2011 08:12:40 +0000 Subject: version bump Package-Manager: portage-2.1.10.39/cvs/Linux x86_64 --- mail-mta/postfix/ChangeLog | 8 +- mail-mta/postfix/Manifest | 32 +-- mail-mta/postfix/postfix-2.9_pre20111129.ebuild | 294 ------------------------ mail-mta/postfix/postfix-2.9_pre20111205.ebuild | 294 ++++++++++++++++++++++++ 4 files changed, 317 insertions(+), 311 deletions(-) delete mode 100644 mail-mta/postfix/postfix-2.9_pre20111129.ebuild create mode 100644 mail-mta/postfix/postfix-2.9_pre20111205.ebuild (limited to 'mail-mta') diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog index 3d45600c8453..770dd2982407 100644 --- a/mail-mta/postfix/ChangeLog +++ b/mail-mta/postfix/ChangeLog @@ -1,6 +1,12 @@ # 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.310 2011/11/30 07:31:04 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.311 2011/12/06 08:12:40 eras Exp $ + +*postfix-2.9_pre20111205 (06 Dec 2011) + + 06 Dec 2011; Eray Aslan -postfix-2.9_pre20111129.ebuild, + +postfix-2.9_pre20111205.ebuild: + version bump *postfix-2.9_pre20111129 (30 Nov 2011) diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest index b9051e04fe80..d25e40501d32 100644 --- a/mail-mta/postfix/Manifest +++ b/mail-mta/postfix/Manifest @@ -14,7 +14,7 @@ DIST postfix-2.8.4.tar.gz 3646391 RMD160 fbeb785c5ed08febf5cf71ea375b10120c1f62b 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.8.7.tar.gz 3647643 RMD160 ab0700f8f340fad11bf2a294a36ff1d70a1a8783 SHA1 81c87aceff4d9af67a304354bab9c99ac98fc8a0 SHA256 5c13465ab47414e9aa2e857851eff1a3f020cebd056e0dde6094ece3552806e5 -DIST postfix-2.9-20111129.tar.gz 3700617 RMD160 641b27b380da20b728e69708bcb9e40a5e652583 SHA1 d798cf68b5ebef7fb945c1e0b88e19285963f953 SHA256 de009001c7247af9952fe3d5b1ed0aa1630818c5c89d0a669d2e3e4086a80167 +DIST postfix-2.9-20111205.tar.gz 3727578 RMD160 0807846b78f0c7977d19a53c051408460aad7249 SHA1 46299b7a09419341447905a7bec804660a2e2c1c SHA256 6c76790f1c83f35de9567ad98d77968e90ad3fc103ed4b471dd865c41390952f 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 DIST postfix-vda-v10-2.8.3.patch 56777 RMD160 ce30005d590d884c589612e65dbd34cbdbf84a31 SHA1 c27217b9af33c86a44bbb4469b7ebd4203210f7a SHA256 02599bdf16e7d77fe6043d1dac972daecdd40c4b2758579200d6ccb11e83acaa @@ -30,23 +30,23 @@ EBUILD postfix-2.8.4.ebuild 8438 RMD160 cdf05986adb042588e332017a430d1c9c10bc527 EBUILD postfix-2.8.5.ebuild 8447 RMD160 d783620f452d45b164b81c3f32fea5488dd703d1 SHA1 55cb7e91a94f1765e13ee8e130f991cc31561fab SHA256 01dcded08cbdb7317ea6fb7d75005d6f49c3faa32209f746bc63710dff77d7cf EBUILD postfix-2.8.6.ebuild 8435 RMD160 d794ccd5fae24cbef65034aedb5f8919ca216483 SHA1 3a0e9b1920bc6fab81287057f1f15bf00a5376a2 SHA256 6c25ce81553164eb797f83b4b170e0b8dd4049ee984653b043e27605ca32ce3a EBUILD postfix-2.8.7.ebuild 8435 RMD160 7a1ef93c53afe95320d82ac49c93401b7a8ae6cb SHA1 298d81a85b5d3098b2f2d0d91116696c8efc8306 SHA256 8ecacd7938c3ed08c774eec1a8aee45c545317e33f2d9b594ad1e6148000b252 -EBUILD postfix-2.9_pre20111129.ebuild 8999 RMD160 bfc84c96b01c66526e727f243ae90cc567d9f529 SHA1 6096f2e0cb15580faa3f61cad24fc5ce3b97a22a SHA256 98c6b38fd3a10b22e5ab4e7162d6e87d750222d962e0848ad990b9c1aa465d71 -MISC ChangeLog 73199 RMD160 1fc8ff1a35adc4328fd90a57e99e8bf4ac124650 SHA1 88fc554b6ad7afc24fbcc4380be738bf0d21b6a3 SHA256 6672aea7334e5d1e8177cff5f27507c36fd7864151ac75c8ed5702643d000836 +EBUILD postfix-2.9_pre20111205.ebuild 8998 RMD160 f48aeb7d3ed46850c2ca608dfe1546abaeed7ac5 SHA1 6a3e80da3c46d05d8e7c1dbf5a4e56ade3eaec0b SHA256 223d9c711367ea9e49a7ad78f3f8eb8892ae45ae24365c6404805fd6c7447a3f +MISC ChangeLog 73367 RMD160 4b81f65e7a6b511113259a96995f9847a965801b SHA1 71170de61b312ec83576655b746c3888f04e3430 SHA256 22930bccfb394fd5332f2cc05f3386e2a057f252a0a4ea52c62e6938d3c89aba MISC metadata.xml 501 RMD160 faf5708865464f36ec686bb58b2474e2a5a1fb53 SHA1 f5d83c47e3edc4a6c337d4bb905eb4917dc0d417 SHA256 7a46203782ad8363c75a53faa35a434e20f879a7f23f624388ce248ea8bb55a0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iQIcBAEBCAAGBQJO1dvHAAoJEHfx8XVYajsft3wQALSP3TAPxkUxzUHJTUJ7uugl -+Vge54nV9gHWog91l6K1LOTjeQldTx4LDloI9bh+vEmrMBVzbJ002kafQDMlgTwp -QdH+zZWhCYlTMRMwX2b9/xlB093Z09P5x3voEU9lzqe8CMTj4AcNNEo4/9EmXLD6 -o0EiNPlMPr/h1IhwfdhA9gGRND0hvkhyii5HeouW1w6iorLGtS1nAfX6TbbSOMpp -Nk2zQh3DMfKR03f8/JCPVkzhSy02eQLX4IOKLHCErBHGa1Q1YuHPpehX3ah4Yj70 -YBy427vxfr99NAsg0Y3Msjonxk6eqPat+gmgL40T9xf/iqxr1mI7Efy+xEZxy6Au -PUIh+jS65ZOJ/MabydnA7PyJYWLkSemdjYVvV1ZZRgqByGBo6uHzXYGCR7oVgY/r -64wi+6OVX4e+MzdPO2SmQA1FGj6hNnxoXF3FQUcnFqn5P6yObhPv/7dlEC6dqXQ2 -It43T2HWRyfqP4A6WrWp1sWoQeXLa7Zvlyqeffjk5q41EYMkQQbwcaOxS58/Rm33 -IoL2ATuNJpUW7A5xZsnXeGjNWlF6M45ZflkX1/F1jSEL0N5nbxmxsY2j7kW6nJcM -j05jzq5J5m6g0n1Lnw0DVrrwdVkJqU6yNxZTes/Cn2Py3mrW/wwHUiNUMUeA6Omc -1wpzEfPJuSoAtkTi9l+K -=3cPC +iQIcBAEBCAAGBQJO3c6JAAoJEHfx8XVYajsfXNkP/2oM0zWIdmGdUiafiVoSkF9p +c8r+BHyhNYBfX0PV5LGUFRgfLRor7Xp+v4nV6T9HlX3BflyTHKdRP5ZxAq/eEM6q +k2rdz2wGKsB69fp/d9cnAABFdVXA9//WduCD9UfZ7ON/VBbjZcmc0lbCw0hJZ2Lz +lL7f23njIrFoLKLLl/oGkYwTo7RBy3pllqyUL2lWOQS7PLsLPu/LeXySp3f51X5y +8Sd0aF9dJTmOUqd60IdTTRqhG7y1Cq59aLCRvGl4hLFDEzbwi2RIESU7G9EoufDE +XHQi39o8D2++tH68t5Aza0kbGW7NbDr20k/Wj6DBKyb3iWevtQZrP7yWZyeaK/RQ +kmTd5ijQL1KEABs9nbdUyxrnfl+wudYTO2wDF6wRB1Y0Zvmg+WY8+qIkY6lukn3K +PR41Qew9NicdsV28mphchkp1v1dPEp2u9PRjmNhwCPMHBTyAwgU30++KuUQA3OFO +d0iPl5MXexpvPWiN3kPEbxevTY93PdQ331b5hURbuqi1+90tqSzkmJNkRQMFBz6u +ks3PcPIW/+9wCtR+l7oRsMeDLhiyyuhT5vouVFxi97B0hJGehh33MEYSxPGUTb8V +EmbsnR+mowvq5+iael4Mr/atQSb7Ef3u6pMcMO95jLn/saRJSVxGMRJQL5BbYrCk +FlD8n6JSywH1A/DajxHJ +=80WH -----END PGP SIGNATURE----- diff --git a/mail-mta/postfix/postfix-2.9_pre20111129.ebuild b/mail-mta/postfix/postfix-2.9_pre20111129.ebuild deleted file mode 100644 index 7b4f187da2a8..000000000000 --- a/mail-mta/postfix/postfix-2.9_pre20111129.ebuild +++ /dev/null @@ -1,294 +0,0 @@ -# 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.9_pre20111129.ebuild,v 1.1 2011/11/30 07:31:04 eras Exp $ - -EAPI=4 - -inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam - -MY_PV="${PV/_pre/-}" -MY_SRC="${PN}-${MY_PV}" -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" -VDA_PV="2.8.5" -VDA_P="${PN}-vda-v10-${VDA_PV}" -RC_VER="2.6" - -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="+berkdb cdb doc dovecot-sasl hardened ipv6 ldap ldap-bind 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 ) - 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[mta] - !net-mail/fastforward" - -REQUIRED_USE="ldap-bind? ( ldap sasl )" - -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 - - 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 berkdb; then - sed -i -e "s|#define HAS_DB$|//#define HAS_DB|g" \ - src/util/sys_defs.h || die - 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 - - 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 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" \ - 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 - # 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_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." - - if [[ ${REPLACING_VERSIONS} < 2.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" - elog - fi -} diff --git a/mail-mta/postfix/postfix-2.9_pre20111205.ebuild b/mail-mta/postfix/postfix-2.9_pre20111205.ebuild new file mode 100644 index 000000000000..2d9c9375e072 --- /dev/null +++ b/mail-mta/postfix/postfix-2.9_pre20111205.ebuild @@ -0,0 +1,294 @@ +# 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.9_pre20111205.ebuild,v 1.1 2011/12/06 08:12:40 eras Exp $ + +EAPI=4 + +inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam + +MY_PV="${PV/_pre/-}" +MY_SRC="${PN}-${MY_PV}" +MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" +VDA_PV="2.8.5" +VDA_P="${PN}-vda-v10-${VDA_PV}" +RC_VER="2.6" + +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="+berkdb cdb doc dovecot-sasl hardened ipv6 ldap ldap-bind 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 ) + 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[mta] + !net-mail/fastforward" + +REQUIRED_USE="ldap-bind? ( ldap sasl )" + +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 + + 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 berkdb; then + sed -i -e "s|#define HAS_DB$|//#define HAS_DB|g" \ + src/util/sys_defs.h || die + 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 + + 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 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" \ + 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 + # 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_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." + + if [[ ${REPLACING_VERSIONS} < 2.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" + elog + fi +} -- cgit v1.2.3-65-gdbad