/[gentoo-x86]/mail-filter/policyd/policyd-1.82-r1.ebuild
Gentoo

Contents of /mail-filter/policyd/policyd-1.82-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Dec 14 20:33:46 2011 UTC (8 years, 2 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Stable for AMD64, wrt bug #323895

(Portage version: 2.1.10.40/cvs/Linux i686)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/mail-filter/policyd/policyd-1.82-r1.ebuild,v 1.3 2011/12/07 18:19:08 jer Exp $
4
5 inherit eutils toolchain-funcs
6
7 DESCRIPTION="Policy daemon for postfix and other MTAs"
8 HOMEPAGE="http://policyd.sf.net/"
9
10 # This is not available through SF mirrors
11 SRC_URI="http://policyd.sourceforge.net/${P}.tar.gz"
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 ~hppa x86"
15 IUSE=""
16 DEPEND="virtual/mysql
17 dev-libs/openssl"
18 RDEPEND="${DEPEND}"
19
20 src_unpack() {
21 unpack ${A}
22 cd "${S}"
23 epatch "${FILESDIR}/${PN}-post182.patch"
24 epatch "${FILESDIR}/${PN}-makefile.patch"
25 sed -i -e "s/gcc/$(tc-getCC)/" Makefile
26
27 ebegin "Applying config patches"
28 sed -i -e s:UID=0:UID=65534:g \
29 -e s:GID=0:GID=65534:g \
30 -e s:DAEMON=0:DAEMON=1:g \
31 -e s:DEBUG=3:DEBUG=0:g \
32 -e s:DATABASE_KEEPALIVE=0:DATABASE_KEEPALIVE=1:g \
33 policyd.conf || die "sed failed"
34 eend
35 }
36
37 src_compile() {
38 emake build || die "emake build failed"
39 }
40
41 src_install() {
42 insopts -o root -g nobody -m 0750
43 mv cleanup policyd_cleanup
44 mv stats policyd_stats
45
46 dosbin policyd policyd_cleanup policyd_stats
47
48 insopts -o root -g nobody -m 0640
49 insinto /etc
50 doins policyd.conf
51
52 insopts -o root -g nobody -m 0700
53 exeinto /etc/cron.hourly
54 newexe "${FILESDIR}/${PN}-cleanup.cron" ${PN}-cleanup.cron
55
56 dodoc ChangeLog DATABASE.mysql README doc/support.txt
57
58 newinitd "${FILESDIR}/${PN}.rc" ${PN}
59 newconfd "${FILESDIR}/${PN}.confd" ${PN}
60 }
61
62 pkg_postinst() {
63 elog "You will need to create the database using the script DATABASE.mysql"
64 elog "in /usr/share/doc/${PF}/"
65 elog "Read the mysql section of the README.txt for details."
66 elog
67 elog "To use policyd with postfix, update your /etc/postfix/main.cf file by adding"
68 elog " check_policy_service inet:127.0.0.1:10031"
69 elog "to your smtpd_recipient_restrictions line, or similar."
70 elog
71 elog "Also remember to start the daemon at boot:"
72 elog " rc-update add policyd default"
73 elog
74 elog "Read the documentation for more info."
75 }

  ViewVC Help
Powered by ViewVC 1.1.20