Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

postfix symlink fix

  • Loading branch information...
commit 23dabb79132acb64ef0982e1c2e9eec27f143d3f 1 parent a3999d3
Oleg authored May 23, 2012
317  mail-mta/postfix/postfix-2.10_pre20120118.ebuild
... ...
@@ -1,317 +0,0 @@
1  
-# Copyright 1999-2012 Gentoo Foundation
2  
-# Distributed under the terms of the GNU General Public License v2
3  
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20120118.ebuild,v 1.1 2012/01/19 16:36:24 eras Exp $
4  
-
5  
-EAPI=4
6  
-
7  
-inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
8  
-
9  
-MY_PV="${PV/_pre/-}"
10  
-MY_SRC="${PN}-${MY_PV}"
11  
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental"
12  
-VDA_PV="2.8.5"
13  
-VDA_P="${PN}-vda-v10-${VDA_PV}"
14  
-RC_VER="2.8"
15  
-
16  
-DESCRIPTION="A fast and secure drop-in replacement for sendmail."
17  
-HOMEPAGE="http://www.postfix.org/"
18  
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
19  
-	vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
20  
-
21  
-LICENSE="IBM"
22  
-SLOT="0"
23  
-KEYWORDS="~*"
24  
-IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
25  
-
26  
-DEPEND=">=dev-libs/libpcre-3.4
27  
-	dev-lang/perl
28  
-	berkdb? ( >=sys-libs/db-3.2 )
29  
-	cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
30  
-	ldap? ( net-nds/openldap )
31  
-	ldap-bind? ( net-nds/openldap[sasl] )
32  
-	mysql? ( virtual/mysql )
33  
-	pam? ( virtual/pam )
34  
-	postgres? ( dev-db/postgresql-base )
35  
-	sasl? (  >=dev-libs/cyrus-sasl-2 )
36  
-	sqlite? ( dev-db/sqlite:3 )
37  
-	ssl? ( >=dev-libs/openssl-0.9.6g )"
38  
-
39  
-RDEPEND="${DEPEND}
40  
-	dovecot-sasl? ( net-mail/dovecot )
41  
-	memcached? ( net-misc/memcached )
42  
-	net-mail/mailbase
43  
-	selinux? ( sec-policy/selinux-postfix )
44  
-	!mail-mta/courier
45  
-	!mail-mta/esmtp
46  
-	!mail-mta/exim
47  
-	!mail-mta/mini-qmail
48  
-	!mail-mta/msmtp[mta]
49  
-	!mail-mta/nbsmtp
50  
-	!mail-mta/netqmail
51  
-	!mail-mta/nullmailer
52  
-	!mail-mta/qmail-ldap
53  
-	!mail-mta/sendmail
54  
-	!<mail-mta/ssmtp-2.64-r2
55  
-	!>=mail-mta/ssmtp-2.64-r2[mta]
56  
-	!net-mail/fastforward"
57  
-
58  
-REQUIRED_USE="ldap-bind? ( ldap sasl )"
59  
-
60  
-S="${WORKDIR}/${MY_SRC}"
61  
-
62  
-pkg_setup() {
63  
-	# Add postfix, postdrop user/group (bug #77565)
64  
-	enewgroup postfix 207
65  
-	enewgroup postdrop 208
66  
-	enewuser postfix 207 -1 /var/spool/postfix postfix,mail
67  
-}
68  
-
69  
-src_prepare() {
70  
-	if use vda; then
71  
-		epatch "${DISTDIR}"/${VDA_P}.patch
72  
-	fi
73  
-
74  
-	if ! use berkdb; then
75  
-		epatch "${FILESDIR}/${PN}_no-berkdb.patch"
76  
-	fi
77  
-
78  
-	sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
79  
-		src/util/sys_defs.h || die "sed failed"
80  
-
81  
-	# change default paths to better comply with portage standard paths
82  
-	sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
83  
-	sed -i -e "/^smtp/s/inet/unix/" conf/master.cf || die "sed failed"
84  
-}
85  
-
86  
-src_configure() {
87  
-	# Make sure LDFLAGS get passed down to the executables.
88  
-	local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
89  
-
90  
-	use pam && mylibs="${mylibs} -lpam"
91  
-
92  
-	if use ldap; then
93  
-		mycc="${mycc} -DHAS_LDAP"
94  
-		mylibs="${mylibs} -lldap -llber"
95  
-	fi
96  
-
97  
-	if use mysql; then
98  
-		mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
99  
-		mylibs="${mylibs} $(mysql_config --libs)"
100  
-	fi
101  
-
102  
-	if use postgres; then
103  
-		mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
104  
-		mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
105  
-	fi
106  
-
107  
-	if use sqlite; then
108  
-		mycc="${mycc} -DHAS_SQLITE"
109  
-		mylibs="${mylibs} -lsqlite3"
110  
-	fi
111  
-
112  
-	if use ssl; then
113  
-		mycc="${mycc} -DUSE_TLS"
114  
-		mylibs="${mylibs} -lssl -lcrypto"
115  
-	fi
116  
-
117  
-	# broken. and "in other words, not supported" by upstream.
118  
-	# Use inet_protocols setting in main.cf
119  
-	#if ! use ipv6; then
120  
-	#	mycc="${mycc} -DNO_IPV6"
121  
-	#fi
122  
-
123  
-	if use sasl; then
124  
-		if use dovecot-sasl; then
125  
-			# Set dovecot as default.
126  
-			mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
127  
-		fi
128  
-		if use ldap-bind; then
129  
-			mycc="${mycc} -DUSE_LDAP_SASL"
130  
-		fi
131  
-		mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
132  
-		mylibs="${mylibs} -lsasl2"
133  
-	elif use dovecot-sasl; then
134  
-		mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
135  
-	fi
136  
-
137  
-	if ! use nis; then
138  
-		sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
139  
-			src/util/sys_defs.h || die "sed failed"
140  
-	fi
141  
-
142  
-	if ! use berkdb; then
143  
-		mycc="${mycc} -DNO_DB"
144  
-		if use cdb; then
145  
-			# change default hash format from Berkeley DB to cdb
146  
-			sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die
147  
-		fi
148  
-	fi
149  
-
150  
-	if use cdb; then
151  
-		mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
152  
-		CDB_LIBS=""
153  
-		# Tinycdb is preferred.
154  
-		if has_version dev-db/tinycdb ; then
155  
-			einfo "Building with dev-db/tinycdb"
156  
-			CDB_LIBS="-lcdb"
157  
-		else
158  
-			einfo "Building with dev-db/cdb"
159  
-			CDB_PATH="/usr/$(get_libdir)"
160  
-			for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
161  
-				CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
162  
-			done
163  
-		fi
164  
-		mylibs="${mylibs} ${CDB_LIBS}"
165  
-	fi
166  
-
167  
-#	mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\""
168  
-#	mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\""
169  
-#	mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\""
170  
-#	mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\""
171  
-#	mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\""
172  
-#	mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\""
173  
-#	mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\""
174  
-#	mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\""
175  
-#	mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\""
176  
-#	mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\""
177  
-#	mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\""
178  
-#	mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\""
179  
-#	mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\""
180  
-
181  
-	# Robin H. Johnson <robbat2@gentoo.org> 17/Nov/2006
182  
-	# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
183  
-	mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
184  
-	filter-lfs-flags
185  
-
186  
-	# Workaround for bug #76512
187  
-	if use hardened; then
188  
-		[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
189  
-	fi
190  
-
191  
-	# Remove annoying C++ comment style warnings - bug #378099
192  
-	append-flags -Wno-comment
193  
-
194  
-	emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
195  
-}
196  
-
197  
-src_install () {
198  
-	/bin/sh postfix-install \
199  
-		-non-interactive \
200  
-		install_root="${D}" \
201  
-		config_directory="/etc/postfix" \
202  
-		manpage_directory="/usr/share/man" \
203  
-		readme_directory="/usr/share/doc/${PF}/readme" \
204  
-		html_directory="/usr/share/doc/${PF}/html" \
205  
-		command_directory="/usr/sbin" \
206  
-		daemon_directory="/usr/$(get_libdir)/postfix" \
207  
-		mailq_path="/usr/bin/mailq" \
208  
-		newaliases_path="/usr/bin/newaliases" \
209  
-		sendmail_path="/usr/sbin/sendmail" \
210  
-		|| die "postfix-install failed"
211  
-
212  
-	# Fix spool removal on upgrade
213  
-	rm -Rf "${D}"/var
214  
-	keepdir /var/spool/postfix
215  
-
216  
-	# Install rmail for UUCP, closes bug #19127
217  
-	dobin auxiliary/rmail/rmail
218  
-
219  
-	# Provide another link for legacy FSH
220  
-	dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
221  
-
222  
-	# Install qshape tool
223  
-	dobin auxiliary/qshape/qshape.pl
224  
-	doman man/man1/qshape.1
225  
-
226  
-	# Performance tuning tools and their manuals
227  
-	dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
228  
-	doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
229  
-
230  
-	# Set proper permissions on required files/directories
231  
-	dodir /var/lib/postfix
232  
-	keepdir /var/lib/postfix
233  
-	fowners postfix:postfix /var/lib/postfix
234  
-	fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
235  
-	fperms 0750 /var/lib/postfix
236  
-	fowners root:postdrop /usr/sbin/post{drop,queue}
237  
-	fperms 02711 /usr/sbin/post{drop,queue}
238  
-
239  
-	keepdir /etc/postfix
240  
-	if use mbox; then
241  
-		mypostconf="mail_spool_directory=/var/spool/mail"
242  
-	else
243  
-		mypostconf="home_mailbox=.maildir/"
244  
-	fi
245  
-	"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
246  
-		-e ${mypostconf} || die "postconf failed"
247  
-
248  
-	insinto /etc/postfix
249  
-	newins "${FILESDIR}"/smtp.pass saslpass
250  
-	fperms 600 /etc/postfix/saslpass
251  
-
252  
-	newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
253  
-	# do not start mysql/postgres unnecessarily - bug #359913
254  
-	use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
255  
-	use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
256  
-
257  
-	mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
258  
-	mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
259  
-
260  
-	dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
261  
-
262  
-	pamd_mimic_system smtp auth account
263  
-
264  
-	if use sasl; then
265  
-		insinto /etc/sasl2
266  
-		newins "${FILESDIR}"/smtp.sasl smtpd.conf
267  
-	fi
268  
-
269  
-	# header files
270  
-	insinto /usr/include/postfix
271  
-	doins include/*.h
272  
-
273  
-	# Remove unnecessary files
274  
-	rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
275  
-	rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
276  
-}
277  
-
278  
-pkg_preinst() {
279  
-	# default for inet_protocols changed from ipv4 to all in postfix-2.9.
280  
-	# check inet_protocols setting in main.cf and modify if necessary to prevent
281  
-	# performance loss with useless DNS lookups and useless connection attempts.
282  
-	[[ -d ${ROOT}/etc/postfix ]] && {
283  
-	if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then
284  
-		if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -nh inet_protocols)" ]];
285  
-		then
286  
-			ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf."
287  
-			ewarn "That will keep the same behaviour as previous postfix versions."
288  
-			ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n"
289  
-		else
290  
-			# delete inet_protocols setting. there is already one in /etc/postfix
291  
-			sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die
292  
-		fi
293  
-	fi
294  
-	}
295  
-}
296  
-
297  
-pkg_postinst() {
298  
-	# Do not install server.{key,pem) SSL certificates if they already exist
299  
-	if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
300  
-		&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
301  
-		SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
302  
-		install_cert /etc/ssl/postfix/server
303  
-		chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
304  
-	fi
305  
-
306  
-	if [[ ${REPLACING_VERSIONS} < 2.9 ]]; then
307  
-		elog "If you are using old style postfix instances by symlinking"
308  
-		elog "startup scripts in ${ROOT}etc/init.d, please consider"
309  
-		elog "upgrading your config for postmulti support. For more info:"
310  
-		elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
311  
-		if ! use berkdb; then
312  
-			ewarn "\nPostfix is installed without BerkeleyDB support."
313  
-			ewarn "Please turn on berkdb USE flag if hash or btree table"
314  
-			ewarn "lookup support is needed.\n"
315  
-		fi
316  
-	fi
317  
-}
303  mail-mta/postfix/postfix-2.10_pre20120202.ebuild
... ...
@@ -1,303 +0,0 @@
1  
-# Copyright 1999-2012 Gentoo Foundation
2  
-# Distributed under the terms of the GNU General Public License v2
3  
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20120202.ebuild,v 1.2 2012/02/05 06:13:58 eras Exp $
4  
-
5  
-EAPI=4
6  
-
7  
-inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam
8  
-
9  
-MY_PV="${PV/_pre/-}"
10  
-MY_SRC="${PN}-${MY_PV}"
11  
-MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental"
12  
-VDA_PV="2.8.5"
13  
-VDA_P="${PN}-vda-v10-${VDA_PV}"
14  
-RC_VER="2.8"
15  
-
16  
-DESCRIPTION="A fast and secure drop-in replacement for sendmail."
17  
-HOMEPAGE="http://www.postfix.org/"
18  
-SRC_URI="${MY_URI}/${MY_SRC}.tar.gz
19  
-	vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) "
20  
-
21  
-LICENSE="IBM"
22  
-SLOT="0"
23  
-KEYWORDS="~*"
24  
-IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda"
25  
-
26  
-DEPEND=">=dev-libs/libpcre-3.4
27  
-	dev-lang/perl
28  
-	berkdb? ( >=sys-libs/db-3.2 )
29  
-	cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) )
30  
-	ldap? ( net-nds/openldap )
31  
-	ldap-bind? ( net-nds/openldap[sasl] )
32  
-	mysql? ( virtual/mysql )
33  
-	pam? ( virtual/pam )
34  
-	postgres? ( dev-db/postgresql-base )
35  
-	sasl? (  >=dev-libs/cyrus-sasl-2 )
36  
-	sqlite? ( dev-db/sqlite:3 )
37  
-	ssl? ( >=dev-libs/openssl-0.9.6g )"
38  
-
39  
-RDEPEND="${DEPEND}
40  
-	dovecot-sasl? ( net-mail/dovecot )
41  
-	memcached? ( net-misc/memcached )
42  
-	net-mail/mailbase
43  
-	selinux? ( sec-policy/selinux-postfix )
44  
-	!mail-mta/courier
45  
-	!mail-mta/esmtp
46  
-	!mail-mta/exim
47  
-	!mail-mta/mini-qmail
48  
-	!mail-mta/msmtp[mta]
49  
-	!mail-mta/nbsmtp
50  
-	!mail-mta/netqmail
51  
-	!mail-mta/nullmailer
52  
-	!mail-mta/qmail-ldap
53  
-	!mail-mta/sendmail
54  
-	!<mail-mta/ssmtp-2.64-r2
55  
-	!>=mail-mta/ssmtp-2.64-r2[mta]
56  
-	!net-mail/fastforward"
57  
-
58  
-REQUIRED_USE="ldap-bind? ( ldap sasl )"
59  
-
60  
-S="${WORKDIR}/${MY_SRC}"
61  
-
62  
-pkg_setup() {
63  
-	# Add postfix, postdrop user/group (bug #77565)
64  
-	enewgroup postfix 207
65  
-	enewgroup postdrop 208
66  
-	enewuser postfix 207 -1 /var/spool/postfix postfix,mail
67  
-}
68  
-
69  
-src_prepare() {
70  
-	if use vda; then
71  
-		epatch "${DISTDIR}"/${VDA_P}.patch
72  
-	fi
73  
-
74  
-	if ! use berkdb; then
75  
-		epatch "${FILESDIR}/${PN}_no-berkdb.patch"
76  
-	fi
77  
-
78  
-	sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \
79  
-		src/util/sys_defs.h || die "sed failed"
80  
-
81  
-	# change default paths to better comply with portage standard paths
82  
-	sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed"
83  
-	sed -i -e "/^smtp/s/inet/unix/" conf/master.cf || die "sed failed"
84  
-}
85  
-
86  
-src_configure() {
87  
-	# Make sure LDFLAGS get passed down to the executables.
88  
-	local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread"
89  
-
90  
-	use pam && mylibs="${mylibs} -lpam"
91  
-
92  
-	if use ldap; then
93  
-		mycc="${mycc} -DHAS_LDAP"
94  
-		mylibs="${mylibs} -lldap -llber"
95  
-	fi
96  
-
97  
-	if use mysql; then
98  
-		mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)"
99  
-		mylibs="${mylibs} $(mysql_config --libs)"
100  
-	fi
101  
-
102  
-	if use postgres; then
103  
-		mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)"
104  
-		mylibs="${mylibs} -lpq -L$(pg_config --libdir)"
105  
-	fi
106  
-
107  
-	if use sqlite; then
108  
-		mycc="${mycc} -DHAS_SQLITE"
109  
-		mylibs="${mylibs} -lsqlite3"
110  
-	fi
111  
-
112  
-	if use ssl; then
113  
-		mycc="${mycc} -DUSE_TLS"
114  
-		mylibs="${mylibs} -lssl -lcrypto"
115  
-	fi
116  
-
117  
-	# broken. and "in other words, not supported" by upstream.
118  
-	# Use inet_protocols setting in main.cf
119  
-	#if ! use ipv6; then
120  
-	#	mycc="${mycc} -DNO_IPV6"
121  
-	#fi
122  
-
123  
-	if use sasl; then
124  
-		if use dovecot-sasl; then
125  
-			# Set dovecot as default.
126  
-			mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\""
127  
-		fi
128  
-		if use ldap-bind; then
129  
-			mycc="${mycc} -DUSE_LDAP_SASL"
130  
-		fi
131  
-		mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
132  
-		mylibs="${mylibs} -lsasl2"
133  
-	elif use dovecot-sasl; then
134  
-		mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
135  
-	fi
136  
-
137  
-	if ! use nis; then
138  
-		sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
139  
-			src/util/sys_defs.h || die "sed failed"
140  
-	fi
141  
-
142  
-	if ! use berkdb; then
143  
-		mycc="${mycc} -DNO_DB"
144  
-		if use cdb; then
145  
-			# change default hash format from Berkeley DB to cdb
146  
-			sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die
147  
-		fi
148  
-	fi
149  
-
150  
-	if use cdb; then
151  
-		mycc="${mycc} -DHAS_CDB -I/usr/include/cdb"
152  
-		CDB_LIBS=""
153  
-		# Tinycdb is preferred.
154  
-		if has_version dev-db/tinycdb ; then
155  
-			einfo "Building with dev-db/tinycdb"
156  
-			CDB_LIBS="-lcdb"
157  
-		else
158  
-			einfo "Building with dev-db/cdb"
159  
-			CDB_PATH="/usr/$(get_libdir)"
160  
-			for i in cdb.a alloc.a buffer.a unix.a byte.a ; do
161  
-				CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}"
162  
-			done
163  
-		fi
164  
-		mylibs="${mylibs} ${CDB_LIBS}"
165  
-	fi
166  
-
167  
-	# Robin H. Johnson <robbat2@gentoo.org> 17/Nov/2006
168  
-	# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check.
169  
-	mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
170  
-	filter-lfs-flags
171  
-
172  
-	# Workaround for bug #76512
173  
-	if use hardened; then
174  
-		[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os
175  
-	fi
176  
-
177  
-	# Remove annoying C++ comment style warnings - bug #378099
178  
-	append-flags -Wno-comment
179  
-
180  
-	emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles
181  
-}
182  
-
183  
-src_install () {
184  
-	/bin/sh postfix-install \
185  
-		-non-interactive \
186  
-		install_root="${D}" \
187  
-		config_directory="/etc/postfix" \
188  
-		manpage_directory="/usr/share/man" \
189  
-		readme_directory="/usr/share/doc/${PF}/readme" \
190  
-		html_directory="/usr/share/doc/${PF}/html" \
191  
-		command_directory="/usr/sbin" \
192  
-		daemon_directory="/usr/$(get_libdir)/postfix" \
193  
-		mailq_path="/usr/bin/mailq" \
194  
-		newaliases_path="/usr/bin/newaliases" \
195  
-		sendmail_path="/usr/sbin/sendmail" \
196  
-		|| die "postfix-install failed"
197  
-
198  
-	# Fix spool removal on upgrade
199  
-	rm -Rf "${D}"/var
200  
-	keepdir /var/spool/postfix
201  
-
202  
-	# Install rmail for UUCP, closes bug #19127
203  
-	dobin auxiliary/rmail/rmail
204  
-
205  
-	# Provide another link for legacy FSH
206  
-	dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail
207  
-
208  
-	# Install qshape tool
209  
-	dobin auxiliary/qshape/qshape.pl
210  
-	doman man/man1/qshape.1
211  
-
212  
-	# Performance tuning tools and their manuals
213  
-	dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink}
214  
-	doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1
215  
-
216  
-	# Set proper permissions on required files/directories
217  
-	dodir /var/lib/postfix
218  
-	keepdir /var/lib/postfix
219  
-	fowners postfix:postfix /var/lib/postfix
220  
-	fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT}
221  
-	fperms 0750 /var/lib/postfix
222  
-	fowners root:postdrop /usr/sbin/post{drop,queue}
223  
-	fperms 02711 /usr/sbin/post{drop,queue}
224  
-
225  
-	keepdir /etc/postfix
226  
-	if use mbox; then
227  
-		mypostconf="mail_spool_directory=/var/spool/mail"
228  
-	else
229  
-		mypostconf="home_mailbox=.maildir/"
230  
-	fi
231  
-	"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \
232  
-		-e ${mypostconf} || die "postconf failed"
233  
-
234  
-	insinto /etc/postfix
235  
-	newins "${FILESDIR}"/smtp.pass saslpass
236  
-	fperms 600 /etc/postfix/saslpass
237  
-
238  
-	newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix
239  
-	# do not start mysql/postgres unnecessarily - bug #359913
240  
-	use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
241  
-	use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
242  
-
243  
-	mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
244  
-	mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
245  
-
246  
-	dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
247  
-
248  
-	pamd_mimic_system smtp auth account
249  
-
250  
-	if use sasl; then
251  
-		insinto /etc/sasl2
252  
-		newins "${FILESDIR}"/smtp.sasl smtpd.conf
253  
-	fi
254  
-
255  
-	# header files
256  
-	insinto /usr/include/postfix
257  
-	doins include/*.h
258  
-
259  
-	# Remove unnecessary files
260  
-	rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic}
261  
-	rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual}
262  
-}
263  
-
264  
-pkg_preinst() {
265  
-	# default for inet_protocols changed from ipv4 to all in postfix-2.9.
266  
-	# check inet_protocols setting in main.cf and modify if necessary to prevent
267  
-	# performance loss with useless DNS lookups and useless connection attempts.
268  
-	[[ -d ${ROOT}/etc/postfix ]] && {
269  
-	if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then
270  
-		if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -nh inet_protocols)" ]];
271  
-		then
272  
-			ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf."
273  
-			ewarn "That will keep the same behaviour as previous postfix versions."
274  
-			ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n"
275  
-		else
276  
-			# delete inet_protocols setting. there is already one in /etc/postfix
277  
-			sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die
278  
-		fi
279  
-	fi
280  
-	}
281  
-}
282  
-
283  
-pkg_postinst() {
284  
-	# Do not install server.{key,pem) SSL certificates if they already exist
285  
-	if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \
286  
-		&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then
287  
-		SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}"
288  
-		install_cert /etc/ssl/postfix/server
289  
-		chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem}
290  
-	fi
291  
-
292  
-	if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then
293  
-		elog "If you are using old style postfix instances by symlinking"
294  
-		elog "startup scripts in ${ROOT}etc/init.d, please consider"
295  
-		elog "upgrading your config for postmulti support. For more info:"
296  
-		elog "http://www.postfix.org/MULTI_INSTANCE_README.html"
297  
-		if ! use berkdb; then
298  
-			ewarn "\nPostfix is installed without BerkeleyDB support."
299  
-			ewarn "Please turn on berkdb USE flag for hash or btree table"
300  
-			ewarn "lookup support.\n"
301  
-		fi
302  
-	fi
303  
-}
2  mail-mta/postfix/postfix-2.10_pre20120308.ebuild
@@ -243,7 +243,7 @@ src_install () {
243 243
 	mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
244 244
 	mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/
245 245
 
246  
-	dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
  246
+	dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
247 247
 
248 248
 	pamd_mimic_system smtp auth account
249 249
 
2  mail-mta/postfix/postfix-2.8.7-r1.ebuild
@@ -241,7 +241,7 @@ src_install () {
241 241
 	use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix"
242 242
 	use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix"
243 243
 
244  
-	dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES*
  244
+	dodoc *README COMPATIBILITY HISTORY PORTING RELEASE_NOTES*
245 245
 
246 246
 	mv "${S}"/examples "${D}"/usr/share/doc/${PF}/
247 247
 	mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/

0 notes on commit 23dabb7

Please sign in to comment.
Something went wrong with that request. Please try again.