From fc2f1018fc323ef2c6572734a9b130427cba76a6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 3 Nov 2021 06:47:15 +0000 Subject: gentoo resync : 03.11.2021 --- mail-mta/Manifest.gz | Bin 2379 -> 2379 bytes mail-mta/postfix/Manifest | 4 +- mail-mta/postfix/postfix-3.7_pre20211023.ebuild | 286 ------------------------ mail-mta/postfix/postfix-3.7_pre20211030.ebuild | 286 ++++++++++++++++++++++++ 4 files changed, 288 insertions(+), 288 deletions(-) delete mode 100644 mail-mta/postfix/postfix-3.7_pre20211023.ebuild create mode 100644 mail-mta/postfix/postfix-3.7_pre20211030.ebuild (limited to 'mail-mta') diff --git a/mail-mta/Manifest.gz b/mail-mta/Manifest.gz index 111c0fa7a28b..7856f3269b93 100644 Binary files a/mail-mta/Manifest.gz and b/mail-mta/Manifest.gz differ diff --git a/mail-mta/postfix/Manifest b/mail-mta/postfix/Manifest index 555dac7b978c..0b2de4467a25 100644 --- a/mail-mta/postfix/Manifest +++ b/mail-mta/postfix/Manifest @@ -5,9 +5,9 @@ AUX smtp.pass 29 BLAKE2B 589915bd2856fa64e22caa12fca54ef342eb07606de38d3879c13ac AUX smtp.sasl 42 BLAKE2B 67e9108101779b6027fa1e5cc7c9256a606d440e15bb037a0da186e6b4983ab26e88ede2f0604737c78144c03e182f66005062f1d49e10443d1ddb9757461d1f SHA512 a48e2bd173c4443dd2c389f6973a541dbcba4223b52b42b409a68d934a7fc82a98d4027267befcd5db6ec628cce6a9dffdf044e6fbd774b6e748f07f4106db47 DIST postfix-3.6.1.tar.gz 4748754 BLAKE2B c64d8f4c12cd7cb39bd15c371c20db4aa61b39120b6c078eda7c48c94d65e181b51ac8f74f3231791fc3ad6c0d04f74975f50776f984ffa9b9f8a4c5c99cbade SHA512 6f83a6aa55bd442fe005b35c7470483ff5ba6781121f783b07ef454580354fc5c85d0d5106936810d6bef0f5592937f0863eec3b82e138caac7694e2a3bb7bc3 DIST postfix-3.6.2.tar.gz 4749530 BLAKE2B 349f3eb2995fe72c89e374a2f95cbb09d4a4f5a5c896e340a2a166ffcb2c498ba514022a59a17d2731807f6dadc03f804a3d4b16127dd2d6addb825558b7ffd6 SHA512 464ce9ec77e637ede91123472a0383b2bfda52102f9e9852c7191016d4fda2e14f302f2db9793887c182688c2a14dde6eeda728523196a627a8028f99555a4d9 -DIST postfix-3.7-20211023.tar.gz 4768047 BLAKE2B 637369d7054c300f357a6abdb06c5d5b83be8ff368bc0e4357f04649f260f8e36de7d9fb19f6335cdcc294f9c34f56545d72f2a91b018bb96a286d3146a31f8a SHA512 6ada0c4d0573b033f92a88ab5cf00dab332b73418d7e2cf5fd32d6d4a5d9fe51839320e2be1dccc28280a78199c9e0c0653ab5e11b9dc068151d75375a2136a8 +DIST postfix-3.7-20211030.tar.gz 4769363 BLAKE2B f37e95d83407989965ee898c29372fd70465c449876f5e22277921c8f5deb2e73f4e8abff2aa4bc44e6e9eab3b1854fea0f71df655933d70a78f9b1f7c9c8e2b SHA512 e97383799e2ecfbd8a87d5608d4604cd6ed792da193ee21356c7ed17426e1ca8b03dab0d991c49effd00f478736dde9a28ab83eca555b89cb0820824aef98842 EBUILD postfix-3.6.1-r1.ebuild 7982 BLAKE2B a2e700693bdabe624f503be1b09010518b6fcf02e364dde1c88b4c81927b13d99244f049f11228ea74f653cc90ed48c9c2b1ee6012b1a379afaf8f7bad7fd6b8 SHA512 97e2a0f1c4a92118ad08afdcb03ec3caaa7d1611d424c45379522ea7136899846f66f4990971012bc2dd8233d7c741889c4e787556bfae2b0c1c75a8568e891b EBUILD postfix-3.6.2-r3.ebuild 7921 BLAKE2B c4a41f841ffb79b1d9e6c4fc858d70a34bb6b261e6150366bd152691785a8df1da11c599ef31f27f7a07f1d581ea72538664309739b55177d4531214052510d0 SHA512 3eb3d37002ea634adf28d54c67912af98631e6ef7443a59be0fd990050f35fc941637a9fb2ca4202c1ee62e359b2a992ac1d7c99b6a8551e07e286f31b14cc0e EBUILD postfix-3.6.2-r4.ebuild 7972 BLAKE2B eb18cab2c20f1684395abae6afa06e4cea8db7543a1dedce106c6bc1b1b17996c842c76a68a4913a2d256e9e3c1e151dd1a3ddc535541d7b39a425f63413610b SHA512 1df2d5dfbd7c065a82386ce2a7d2b63891436951ef02ec250241bf17c2e2d95867c14d15cc5a211235da0dc40ab89737f4db6c8505da8395c8cb993ae81e4e8c -EBUILD postfix-3.7_pre20211023.ebuild 7929 BLAKE2B 164ff69129c6d4a246dc15a4c27340c6500df5d701da2a0f0d451f9fbc013afb848103c640f873cca58f5cc8aa8696d2b31cc5a0bba69581557349136c067731 SHA512 4c6fe1b2625c343f838313ae08128e81629c6ec76714481a165838d6a9aab56287318391fa7f93e5891120c11f4b0a3dcdd0d49a0d75f604f39625c2f06ce72f +EBUILD postfix-3.7_pre20211030.ebuild 7929 BLAKE2B 164ff69129c6d4a246dc15a4c27340c6500df5d701da2a0f0d451f9fbc013afb848103c640f873cca58f5cc8aa8696d2b31cc5a0bba69581557349136c067731 SHA512 4c6fe1b2625c343f838313ae08128e81629c6ec76714481a165838d6a9aab56287318391fa7f93e5891120c11f4b0a3dcdd0d49a0d75f604f39625c2f06ce72f MISC metadata.xml 867 BLAKE2B 1839d35c91007bb07e1a722b6b4751e9f7754e00109859efe5850df16486bafbaeb019326d006438471678553aca9474462fa32eaba445362113ced6927bf4ab SHA512 ff898bdce2b60bc52a0d326f8f8221bd474cc4fa31def2ccc5526ba59ad396b0b26f22cc98ca4e1181e3c38e5476615e53bde2db1e643ae5b9209ac581ecc1fd diff --git a/mail-mta/postfix/postfix-3.7_pre20211023.ebuild b/mail-mta/postfix/postfix-3.7_pre20211023.ebuild deleted file mode 100644 index f5274f856140..000000000000 --- a/mail-mta/postfix/postfix-3.7_pre20211023.ebuild +++ /dev/null @@ -1,286 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit pam systemd toolchain-funcs - -MY_PV="${PV/_pre/-}" -MY_SRC="${PN}-${MY_PV}" -MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" -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" - -LICENSE="|| ( IBM EPL-2.0 )" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="+berkdb cdb dovecot-sasl +eai ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" - -DEPEND=" - acct-group/postfix - acct-group/postdrop - acct-user/postfix - >=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-r4 ) ) - eai? ( dev-libs/icu:= ) - ldap? ( net-nds/openldap ) - ldap-bind? ( net-nds/openldap[sasl] ) - lmdb? ( >=dev-db/lmdb-0.9.11:= ) - mysql? ( dev-db/mysql-connector-c:0= ) - nis? ( net-libs/libnsl:= ) - pam? ( sys-libs/pam ) - postgres? ( dev-db/postgresql:* ) - sasl? ( >=dev-libs/cyrus-sasl-2 ) - sqlite? ( dev-db/sqlite:3 ) - ssl? ( >=dev-libs/openssl-1.1.1:0= ) - " - -RDEPEND="${DEPEND} - memcached? ( net-misc/memcached ) - net-mail/mailbase - !mail-mta/courier - !mail-mta/esmtp - !mail-mta/exim - !mail-mta/msmtp[mta] - !mail-mta/netqmail - !mail-mta/nullmailer - !mail-mta/sendmail - !mail-mta/opensmtpd - !mail-mta/ssmtp[mta] - selinux? ( sec-policy/selinux-postfix )" - -REQUIRED_USE="ldap-bind? ( ldap sasl )" - -S="${WORKDIR}/${MY_SRC}" - -src_prepare() { - default - 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() { - for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE - do - local AUXLIBS_${name}="" - done - - # Make sure LDFLAGS get passed down to the executables. - local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" - AUXLIBS_PCRE="$(pcre-config --libs)" - - use pam && mylibs="${mylibs} -lpam" - - if use ldap; then - mycc="${mycc} -DHAS_LDAP" - AUXLIBS_LDAP="-lldap -llber" - fi - - if use mysql; then - mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" - AUXLIBS_MYSQL="$(mysql_config --libs)" - fi - - if use postgres; then - mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" - AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" - fi - - if use sqlite; then - mycc="${mycc} -DHAS_SQLITE" - AUXLIBS_SQLITE="-lsqlite3 -lpthread" - fi - - if use ssl; then - mycc="${mycc} -DUSE_TLS" - mylibs="${mylibs} -lssl -lcrypto" - fi - - if use lmdb; then - mycc="${mycc} -DHAS_LMDB" - AUXLIBS_LMDB="-llmdb -lpthread" - fi - - if ! use eai; then - mycc="${mycc} -DNO_EAI" - 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 - mycc="${mycc} -DNO_NIS" - fi - - if ! use berkdb; then - mycc="${mycc} -DNO_DB" - if use cdb; then - # change default hash format from Berkeley DB to cdb - mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" - fi - fi - - if use cdb; then - mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" - # Tinycdb is preferred. - if has_version dev-db/tinycdb ; then - einfo "Building with dev-db/tinycdb" - AUXLIBS_CDB="-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 - AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" - done - fi - fi - - sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs - sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs - - emake makefiles shared=yes dynamicmaps=no pie=yes \ - shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ - DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ - AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ - AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ - AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ - AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" -} - -src_install() { - LD_LIBRARY_PATH="${S}/lib" \ - /bin/sh postfix-install \ - -non-interactive \ - install_root="${D}" \ - config_directory="/etc/postfix" \ - manpage_directory="/usr/share/man" \ - 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 ../sbin/sendmail /usr/$(get_libdir)/sendmail - - # Install qshape, posttls-finger, collate and tlstype - dobin auxiliary/qshape/qshape.pl - doman man/man1/qshape.1 - dobin bin/posttls-finger - doman man/man1/posttls-finger.1 - dobin auxiliary/collate/collate.pl - newdoc auxiliary/collate/README README.collate - dobin auxiliary/collate/tlstype.pl - dodoc auxiliary/collate/README.tlstype - - # 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 - keepdir /var/lib/postfix - fowners -R postfix:postfix /var/lib/postfix - fperms 0750 /var/lib/postfix - fowners root:postdrop /usr/sbin/post{drop,queue,log} - fperms 02755 /usr/sbin/post{drop,queue,log} - - keepdir /etc/postfix - keepdir /etc/postfix/postfix-files.d - if use mbox; then - mypostconf="mail_spool_directory=/var/spool/mail" - else - mypostconf="home_mailbox=.maildir/" - fi - LD_LIBRARY_PATH="${S}/lib" \ - "${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" - - dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* - mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ - # postfix set-permissions expects uncompressed man files - docompress -x /usr/share/man - - if use pam; then - pamd_mimic_system smtp auth account - fi - - if use sasl; then - insinto /etc/sasl2 - newins "${FILESDIR}"/smtp.sasl smtpd.conf - fi - - # header files - insinto /usr/include/postfix - doins include/*.h - - if has_version mail-mta/postfix; then - # let the sysadmin decide when to change the compatibility_level - sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die - fi - - systemd_dounit "${FILESDIR}/${PN}.service" -} - -pkg_postinst() { - 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 - - # check and fix file permissions - "${EROOT}"/usr/sbin/postfix set-permissions - - # configure tls - if use ssl ; then - if "${EROOT}"/usr/sbin/postfix tls all-default-client; then - elog "To configure client side TLS settings:" - elog "${EROOT}"/usr/sbin/postfix tls enable-client - fi - if "${EROOT}"/usr/sbin/postfix tls all-default-server; then - elog "To configure server side TLS settings:" - elog "${EROOT}"/usr/sbin/postfix tls enable-server - fi - fi -} diff --git a/mail-mta/postfix/postfix-3.7_pre20211030.ebuild b/mail-mta/postfix/postfix-3.7_pre20211030.ebuild new file mode 100644 index 000000000000..f5274f856140 --- /dev/null +++ b/mail-mta/postfix/postfix-3.7_pre20211030.ebuild @@ -0,0 +1,286 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit pam systemd toolchain-funcs + +MY_PV="${PV/_pre/-}" +MY_SRC="${PN}-${MY_PV}" +MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" +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" + +LICENSE="|| ( IBM EPL-2.0 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="+berkdb cdb dovecot-sasl +eai ldap ldap-bind lmdb memcached mbox mysql nis pam postgres sasl selinux sqlite ssl" + +DEPEND=" + acct-group/postfix + acct-group/postdrop + acct-user/postfix + >=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-r4 ) ) + eai? ( dev-libs/icu:= ) + ldap? ( net-nds/openldap ) + ldap-bind? ( net-nds/openldap[sasl] ) + lmdb? ( >=dev-db/lmdb-0.9.11:= ) + mysql? ( dev-db/mysql-connector-c:0= ) + nis? ( net-libs/libnsl:= ) + pam? ( sys-libs/pam ) + postgres? ( dev-db/postgresql:* ) + sasl? ( >=dev-libs/cyrus-sasl-2 ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( >=dev-libs/openssl-1.1.1:0= ) + " + +RDEPEND="${DEPEND} + memcached? ( net-misc/memcached ) + net-mail/mailbase + !mail-mta/courier + !mail-mta/esmtp + !mail-mta/exim + !mail-mta/msmtp[mta] + !mail-mta/netqmail + !mail-mta/nullmailer + !mail-mta/sendmail + !mail-mta/opensmtpd + !mail-mta/ssmtp[mta] + selinux? ( sec-policy/selinux-postfix )" + +REQUIRED_USE="ldap-bind? ( ldap sasl )" + +S="${WORKDIR}/${MY_SRC}" + +src_prepare() { + default + 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() { + for name in CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE + do + local AUXLIBS_${name}="" + done + + # Make sure LDFLAGS get passed down to the executables. + local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -ldl" + AUXLIBS_PCRE="$(pcre-config --libs)" + + use pam && mylibs="${mylibs} -lpam" + + if use ldap; then + mycc="${mycc} -DHAS_LDAP" + AUXLIBS_LDAP="-lldap -llber" + fi + + if use mysql; then + mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" + AUXLIBS_MYSQL="$(mysql_config --libs)" + fi + + if use postgres; then + mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" + AUXLIBS_PGSQL="-L$(pg_config --libdir) -lpq" + fi + + if use sqlite; then + mycc="${mycc} -DHAS_SQLITE" + AUXLIBS_SQLITE="-lsqlite3 -lpthread" + fi + + if use ssl; then + mycc="${mycc} -DUSE_TLS" + mylibs="${mylibs} -lssl -lcrypto" + fi + + if use lmdb; then + mycc="${mycc} -DHAS_LMDB" + AUXLIBS_LMDB="-llmdb -lpthread" + fi + + if ! use eai; then + mycc="${mycc} -DNO_EAI" + 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 + mycc="${mycc} -DNO_NIS" + fi + + if ! use berkdb; then + mycc="${mycc} -DNO_DB" + if use cdb; then + # change default hash format from Berkeley DB to cdb + mycc="${mycc} -DDEF_DB_TYPE=\\\"cdb\\\"" + fi + fi + + if use cdb; then + mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" + # Tinycdb is preferred. + if has_version dev-db/tinycdb ; then + einfo "Building with dev-db/tinycdb" + AUXLIBS_CDB="-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 + AUXLIBS_CDB="${AUXLIBS_CDB} ${CDB_PATH}/${i}" + done + fi + fi + + sed -i -e "/^RANLIB/s/ranlib/$(tc-getRANLIB)/g" "${S}"/makedefs + sed -i -e "/^AR/s/ar/$(tc-getAR)/g" "${S}"/makedefs + + emake makefiles shared=yes dynamicmaps=no pie=yes \ + shlib_directory="/usr/$(get_libdir)/postfix/MAIL_VERSION" \ + DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" \ + AUXLIBS_CDB="${AUXLIBS_CDB}" AUXLIBS_LDAP="${AUXLIBS_LDAP}" \ + AUXLIBS_LMDB="${AUXLIBS_LMDB}" AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" \ + AUXLIBS_PCRE="${AUXLIBS_PCRE}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ + AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" +} + +src_install() { + LD_LIBRARY_PATH="${S}/lib" \ + /bin/sh postfix-install \ + -non-interactive \ + install_root="${D}" \ + config_directory="/etc/postfix" \ + manpage_directory="/usr/share/man" \ + 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 ../sbin/sendmail /usr/$(get_libdir)/sendmail + + # Install qshape, posttls-finger, collate and tlstype + dobin auxiliary/qshape/qshape.pl + doman man/man1/qshape.1 + dobin bin/posttls-finger + doman man/man1/posttls-finger.1 + dobin auxiliary/collate/collate.pl + newdoc auxiliary/collate/README README.collate + dobin auxiliary/collate/tlstype.pl + dodoc auxiliary/collate/README.tlstype + + # 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 + keepdir /var/lib/postfix + fowners -R postfix:postfix /var/lib/postfix + fperms 0750 /var/lib/postfix + fowners root:postdrop /usr/sbin/post{drop,queue,log} + fperms 02755 /usr/sbin/post{drop,queue,log} + + keepdir /etc/postfix + keepdir /etc/postfix/postfix-files.d + if use mbox; then + mypostconf="mail_spool_directory=/var/spool/mail" + else + mypostconf="home_mailbox=.maildir/" + fi + LD_LIBRARY_PATH="${S}/lib" \ + "${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" + + dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES* + mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ + # postfix set-permissions expects uncompressed man files + docompress -x /usr/share/man + + if use pam; then + pamd_mimic_system smtp auth account + fi + + if use sasl; then + insinto /etc/sasl2 + newins "${FILESDIR}"/smtp.sasl smtpd.conf + fi + + # header files + insinto /usr/include/postfix + doins include/*.h + + if has_version mail-mta/postfix; then + # let the sysadmin decide when to change the compatibility_level + sed -i -e /^compatibility_level/"s/^/#/" "${D}"/etc/postfix/main.cf || die + fi + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + 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 + + # check and fix file permissions + "${EROOT}"/usr/sbin/postfix set-permissions + + # configure tls + if use ssl ; then + if "${EROOT}"/usr/sbin/postfix tls all-default-client; then + elog "To configure client side TLS settings:" + elog "${EROOT}"/usr/sbin/postfix tls enable-client + fi + if "${EROOT}"/usr/sbin/postfix tls all-default-server; then + elog "To configure server side TLS settings:" + elog "${EROOT}"/usr/sbin/postfix tls enable-server + fi + fi +} -- cgit v1.2.3