From 6837b0e8a7f5218b5bcdd0101831cc75ae068526 Mon Sep 17 00:00:00 2001 From: Eray Aslan Date: Fri, 18 Nov 2011 07:16:31 +0000 Subject: version bump Package-Manager: portage-2.1.10.35/cvs/Linux x86_64 --- mail-mta/postfix/ChangeLog | 8 +- mail-mta/postfix/Manifest | 32 +-- mail-mta/postfix/postfix-2.9_pre20111113.ebuild | 293 ------------------------ mail-mta/postfix/postfix-2.9_pre20111117.ebuild | 293 ++++++++++++++++++++++++ 4 files changed, 316 insertions(+), 310 deletions(-) delete mode 100644 mail-mta/postfix/postfix-2.9_pre20111113.ebuild create mode 100644 mail-mta/postfix/postfix-2.9_pre20111117.ebuild (limited to 'mail-mta') diff --git a/mail-mta/postfix/ChangeLog b/mail-mta/postfix/ChangeLog index d6e7ffdeb719..75b671fa67d6 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.300 2011/11/14 12:14:53 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.301 2011/11/18 07:16:31 eras Exp $ + +*postfix-2.9_pre20111117 (18 Nov 2011) + + 18 Nov 2011; Eray Aslan -postfix-2.9_pre20111113.ebuild, + +postfix-2.9_pre20111117.ebuild: + version bump *postfix-2.9_pre20111113 (14 Nov 2011) diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest index a61feaca5759..fa8190a9e965 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-20111113.tar.gz 3685450 RMD160 c7712338d7693a1ab51b4f72e48a646e9149095b SHA1 902f65f93e89ab5c471aaf5557db13083d8f1a43 SHA256 c8f493b9206b4ac52fdfdae72fee214d22d29206d353a6110188305019d906e3 +DIST postfix-2.9-20111117.tar.gz 3684552 RMD160 dca9e7cb2f064160bad3d5af47241a39c44cd7fb SHA1 1739001e5efeb40d5d33a779c213eac6c91a5d2f SHA256 68507280aeef07ac023f5854b67310e40f256be102d3e1948e9d6cbe1881ea46 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 8427 RMD160 b1dcc810141c23f572de3074d1279ce8c2767761 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.8.7.ebuild 8423 RMD160 4f603638f773bf64af1dd9cbf0f8916dbb1e5f49 SHA1 d60f2fc8872cb6ccd7ef864b4a24ced73594067d SHA256 b0b633b991107b10154791da81da29a132959dba32245d2591baba22a8734bc2 -EBUILD postfix-2.9_pre20111113.ebuild 8899 RMD160 ed74a74a7e95621ec19dd3091fae2f6dd2d61254 SHA1 bf4d341c8ca5bb9fc4c0210b13c9fc701266fad3 SHA256 381b8c3b0decc317eaef0ff4f14a17b41f55c9cdd7f1b31a2b81eae2f7aca93a -MISC ChangeLog 71370 RMD160 8fbe12845ff73166ceebd33a56136ab408cad3f2 SHA1 a87db929b7183653bbe698c39495d205097e529d SHA256 6543cbaef2b53f284e4ac73463e69b75cd680883ff241086321076bb5f6ef94d +EBUILD postfix-2.9_pre20111117.ebuild 8899 RMD160 fa066ebcd58f058dadf2b99717ab5bcc96c34329 SHA1 af7b79b283c3eb9f37e2a3d3d35f9dd09ac88088 SHA256 a567b13346ce32a924edc37ace03d6b23c7cf3b7a45e86816033f28646a1e9d6 +MISC ChangeLog 71538 RMD160 115c8b72ff1aa34b9f31b7f499aa77a71c78416d SHA1 227ea743106d26df15c44b281465bf5839db3bfd SHA256 a1f813d506877429a6580c9929a2469e3c6b8f03c04e8c514b76e2d38130dff6 MISC metadata.xml 501 RMD160 faf5708865464f36ec686bb58b2474e2a5a1fb53 SHA1 f5d83c47e3edc4a6c337d4bb905eb4917dc0d417 SHA256 7a46203782ad8363c75a53faa35a434e20f879a7f23f624388ce248ea8bb55a0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iQIcBAEBCAAGBQJOwQZLAAoJEHfx8XVYajsfjEwQAI87NjJeVj4683AMDKISFd7W -x3eZbeiRU6YsqoXBAblAGpHGp+4mFUn+1mIm38Rz2qY2wkEpSnlx7IuizEbM4Lks -QsakBF1yIqAsR1bmsc36zDs2RNPE0FMjxnXbDM8kGvyfbwOQxx7mjD7F4oe2EVxO -MLycePA2olmr0fkFU8FdAyr4DF8UoUhIgrbPi/3WRZnhmprj8wGtAsF0hhx80ons -RtkKxPoOoagCKuzycYWzKPjB8rKkC5hwRHfHlxf+W8G97RsMO8i0kXg9qSLKnXKE -IsglLgqJvxReWI+03izKEjP77q1zZxSKS/O8glh0S0bAFu/CqmuOyDXQfDjFMMV7 -Sz4u9apS2y6NIWZ3159+iCXmPyYErHm7UCQFVuj3qx9YgVHJq01gVOr0WDTeixql -gTtN7Oi0ZKbvavmiGwSXP2BzXKIgFMNMCcosxjUwezdLZcH6yTRIV8So0sTtx+S+ -RlanPb6pOw18iShYSuSHbdvV2MlzOqlHeaVm7bVuw3UVs7DWQnMbBh9LkI6Yui7x -hRiO53DWM8aCtLQRskfIlu+s3uDZ5jnJy71RkAocpGLWD0x3vdOdUli64IgRPPac -vXFhJHB8LV8q0Y/0dmlgk9uVP6brCCyWRw1FA6XytiX3pFAhSiA0Du7GL/96WN07 -fYu/RyNc/bx1fdx7a0j4 -=Hp4i +iQIcBAEBCAAGBQJOxgZeAAoJEHfx8XVYajsfh/YP/0uNYP6Eg8hLkZjk7yL7iBls +zNL9Nh18z+gxL1Rgrn61FavGQr0E2pxOn85ZsEKNlpEKOu59QRR2snrzCrRhg0p/ +f2pFHMUzxtbB6QadRzN5LGG6yhGyw6XRAIFLcieMP7yJU/+maziHqJujMeTiqNyV +MXuNRAs2Smru7+tW31b+ZbQZ0y2eS4z1szUngtjB3Z0RzemCUO4J2R4m9KbvkeaM +JgbFJGbWuVC+b5I45X9U2s3Kv5R10VhKlQXjPxzBueSniQXDwOkATIPIjLlKASOi +f7s73Hr4YEyKv2n6Pfs5mPo2Klv3bCL/7/g8K/VmpF6ghZX/ShxWprG0Q/plcs2H +dMDuFYNowipAm5+Okkv1RLzAFH7lDTXVGbTWrkdYGU41kBzCVp/GsDgAZQm/1dEu +afhDLBaHRm6RrpGZb/XsReHXSscswtoMPRcCavpTk08z9PoSldB+mUHTbtOhJK9c +rxW+tiTaZEBMQMiLocERgUN40PD7bRfvveGfcRFRLEEeV2B+Gr+qgiqGznOGoFHc +UxVDl/TZ7EYNmCD9aEjeCZZNIox5PH2k+oSYk7O4fIDtzRhpw7uaPdwDKX1DEAuP +O6qTcxqR0erPaOexYIRrq5RCP9rXDa1BZLmZIgs7RwARl5ufKCRE45K1nOWdIsu+ +Ahvk9ekN4fyHXms5nNHq +=Vy6f -----END PGP SIGNATURE----- diff --git a/mail-mta/postfix/postfix-2.9_pre20111113.ebuild b/mail-mta/postfix/postfix-2.9_pre20111113.ebuild deleted file mode 100644 index 2aecebb0289e..000000000000 --- a/mail-mta/postfix/postfix-2.9_pre20111113.ebuild +++ /dev/null @@ -1,293 +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_pre20111113.ebuild,v 1.1 2011/11/14 12:14:53 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 ~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 - # change default hash format from Berkeley DB to cdb - sed -i -e "s|#define HAS_DB$|//#define HAS_DB|g" -e "s/hash/cdb/" \ - src/util/sys_defs.h || die - 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 - # 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_pre20111117.ebuild b/mail-mta/postfix/postfix-2.9_pre20111117.ebuild new file mode 100644 index 000000000000..834a241785d5 --- /dev/null +++ b/mail-mta/postfix/postfix-2.9_pre20111117.ebuild @@ -0,0 +1,293 @@ +# 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_pre20111117.ebuild,v 1.1 2011/11/18 07:16:31 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 ~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 + # change default hash format from Berkeley DB to cdb + sed -i -e "s|#define HAS_DB$|//#define HAS_DB|g" -e "s/hash/cdb/" \ + src/util/sys_defs.h || die + 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 + # 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