1 |
commit: 835d4bda9b6d3176afe230a5df99194a309e5d15 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 11 00:31:56 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 11 00:31:56 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=835d4bda |
7 |
|
8 |
mail-filter/policyd: add libressl support |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
mail-filter/policyd/policyd-1.82-r2.ebuild | 76 ++++++++++++++++++++++++++++++ |
13 |
1 file changed, 76 insertions(+) |
14 |
|
15 |
diff --git a/mail-filter/policyd/policyd-1.82-r2.ebuild b/mail-filter/policyd/policyd-1.82-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..c54494a |
18 |
--- /dev/null |
19 |
+++ b/mail-filter/policyd/policyd-1.82-r2.ebuild |
20 |
@@ -0,0 +1,76 @@ |
21 |
+# Copyright 1999-2011 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI="5" |
26 |
+ |
27 |
+inherit eutils toolchain-funcs |
28 |
+ |
29 |
+DESCRIPTION="Policy daemon for postfix and other MTAs" |
30 |
+HOMEPAGE="http://policyd.sf.net/" |
31 |
+ |
32 |
+# This is not available through SF mirrors |
33 |
+SRC_URI="http://policyd.sourceforge.net/${P}.tar.gz" |
34 |
+LICENSE="GPL-2" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~amd64 ~hppa ~x86" |
37 |
+IUSE="libressl" |
38 |
+DEPEND="virtual/mysql |
39 |
+ !libressl? ( dev-libs/openssl:0 ) |
40 |
+ libressl? ( dev-libs/libressl )" |
41 |
+RDEPEND="${DEPEND}" |
42 |
+ |
43 |
+src_prepare() { |
44 |
+ epatch "${FILESDIR}/${PN}-post182.patch" |
45 |
+ epatch "${FILESDIR}/${PN}-makefile.patch" |
46 |
+ sed -i -e "s/gcc/$(tc-getCC)/" Makefile |
47 |
+ |
48 |
+ ebegin "Applying config patches" |
49 |
+ sed -i -e s:UID=0:UID=65534:g \ |
50 |
+ -e s:GID=0:GID=65534:g \ |
51 |
+ -e s:DAEMON=0:DAEMON=1:g \ |
52 |
+ -e s:DEBUG=3:DEBUG=0:g \ |
53 |
+ -e s:DATABASE_KEEPALIVE=0:DATABASE_KEEPALIVE=1:g \ |
54 |
+ policyd.conf || die "sed failed" |
55 |
+ eend |
56 |
+} |
57 |
+ |
58 |
+src_compile() { |
59 |
+ emake build || die "emake build failed" |
60 |
+} |
61 |
+ |
62 |
+src_install() { |
63 |
+ insopts -o root -g nobody -m 0750 |
64 |
+ mv cleanup policyd_cleanup |
65 |
+ mv stats policyd_stats |
66 |
+ |
67 |
+ dosbin policyd policyd_cleanup policyd_stats |
68 |
+ |
69 |
+ insopts -o root -g nobody -m 0640 |
70 |
+ insinto /etc |
71 |
+ doins policyd.conf |
72 |
+ |
73 |
+ insopts -o root -g nobody -m 0700 |
74 |
+ exeinto /etc/cron.hourly |
75 |
+ newexe "${FILESDIR}/${PN}-cleanup.cron" ${PN}-cleanup.cron |
76 |
+ |
77 |
+ dodoc ChangeLog DATABASE.mysql README doc/support.txt |
78 |
+ |
79 |
+ newinitd "${FILESDIR}/${PN}.rc" ${PN} |
80 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
81 |
+} |
82 |
+ |
83 |
+pkg_postinst() { |
84 |
+ elog "You will need to create the database using the script DATABASE.mysql" |
85 |
+ elog "in /usr/share/doc/${PF}/" |
86 |
+ elog "Read the mysql section of the README.txt for details." |
87 |
+ elog |
88 |
+ elog "To use policyd with postfix, update your /etc/postfix/main.cf file by adding" |
89 |
+ elog " check_policy_service inet:127.0.0.1:10031" |
90 |
+ elog "to your smtpd_recipient_restrictions line, or similar." |
91 |
+ elog |
92 |
+ elog "Also remember to start the daemon at boot:" |
93 |
+ elog " rc-update add policyd default" |
94 |
+ elog |
95 |
+ elog "Read the documentation for more info." |
96 |
+} |