# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.2_beta20050203.ebuild,v 1.1 2005/02/04 04:07:42 langthang Exp $ inherit eutils ssl-cert toolchain-funcs flag-o-matic fixheadtails IUSE="ipv6 pam ldap mysql postgres ssl sasl mailwrapper mbox nis vda selinux hardened" MY_PV=${PV/_beta/-} MY_SRC=${PN}-${MY_PV} #VDA_P="${PN}-2.1.5-trash" DESCRIPTION="A fast and secure drop-in replacement for sendmail." HOMEPAGE="http://www.postfix.org/" SRC_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/${MY_SRC}.tar.gz" # vda? ( http://web.onda.com.br/nadal/postfix/VDA/${VDA_P}.patch.gz ) LICENSE="IPL-1" SLOT="0" KEYWORDS="~x86 ~sparc ~ppc ~alpha ~amd64 ~s390 ~mips ~hppa ~ppc64" PROVIDE="virtual/mta virtual/mda" DEPEND=">=sys-libs/db-3.2 >=dev-libs/libpcre-3.4 >=sys-apps/sed-4 ldap? ( >=net-nds/openldap-1.2 ) mysql? ( >=dev-db/mysql-3.23.51 ) postgres? ( >=dev-db/postgresql-7.1 ) ssl? ( >=dev-libs/openssl-0.9.6g ) sasl? ( >=dev-libs/cyrus-sasl-2 )" RDEPEND="${DEPEND} >=net-mail/mailbase-0.00 selinux? ( sec-policy/selinux-postfix ) !mailwrapper? ( !virtual/mta ) mailwrapper? ( >=net-mail/mailwrapper-0.2 )" S=${WORKDIR}/${MY_SRC} group_user_check() { einfo "checking for postfix group... create if missing." enewgroup postfix 207 einfo "checking for postdrop group... create if missing." enewgroup postdrop 208 einfo "checking for postfix user... create if missing." enewuser postfix 207 /bin/false /var/spool/postfix postfix } pkg_setup() { # developmental realease warn echo ewarn "This is a experimental release. Do not use on production system." ewarn "Read \"ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/${TLS_SRC}.RELEASE_NOTES\"" ewarn "for incompatible changes before continue." ewarn "\"vda\" has been removed as it isn't available for experimetal Postfix release." ewarn "\"vda\" will be added as soon as it's available." ewarn "Bugs should be filed at \"http://bugs.gentoo.org\"" ewarn "assign to \"net-mail@gentoo.org\"." echo epause 5 # put out warnings to work around bug #45764 if has_version '<=mail-mta/postfix-2.0.18'; then echo ewarn "You are upgrading from postfix-2.0.18 or earlier, one of the empty queue" ewarn "directory get deleted during unmerge the older version (#45764). Please run" ewarn "\`etc/postfix/post-install upgrade-source\` to recreate them." echo epause 5 fi #TLS non-prod warn if use ssl; then echo ewarn "you have \"ssl\" in your USE flags" ewarn "TLS will be enabled. This is a work in progress." ewarn "Visit http://www.postfix.org/TLS_README.html for more info." echo epause 5 fi # IPV6 non-prod warn if use ipv6; then echo ewarn "you have \"ipv6\" in your USE flags" ewarn "TLS will be enabled. This is a work in progress." ewarn "Visit http://www.postfix.org/IPV6_README.html for more info." echo fi # VDA error if use vda; then eerror "VDA patch is not available yet for this snapshot" eerror "If you still want to update to this snapshot" eerror "please remove \"vda\" from your USE flags." die "VDA support is not available at this time!" fi # add postfix, postdrop user/group. Bug #77565. group_user_check || die "failed to check/add needed user/group" # logic to fix bug #53324 if [[ $(ps h -u postfix) ]]; then if has_version '