/[gentoo-x86]/mail-filter/amavisd-new/amavisd-new-2.7.2.ebuild
Gentoo

Contents of /mail-filter/amavisd-new/amavisd-new-2.7.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Aug 5 01:41:05 2012 UTC (2 years, 4 months ago) by jer
Branch: MAIN
Changes since 1.1: +2 -2 lines
Stable for HPPA (bug #429106).

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

1 eras 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 jer 1.2 # $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/amavisd-new-2.7.2.ebuild,v 1.1 2012/07/01 17:25:48 eras Exp $
4 eras 1.1
5     EAPI=4
6     inherit eutils user
7    
8     MY_P="${P/_/-}"
9     DESCRIPTION="High-performance interface between the MTA and content checkers."
10     HOMEPAGE="http://www.ijs.si/software/amavisd/"
11     SRC_URI="http://www.ijs.si/software/amavisd/${MY_P}.tar.gz"
12    
13     LICENSE="GPL-2"
14     SLOT="0"
15 jer 1.2 KEYWORDS="~alpha ~amd64 hppa ~ppc ~ppc64 ~sparc ~x86"
16 eras 1.1 IUSE="courier dkim ldap mysql postgres qmail razor snmp spamassassin"
17    
18     DEPEND=">=sys-apps/sed-4
19     >=dev-lang/perl-5.8.2"
20    
21     RDEPEND="${DEPEND}
22     >=sys-apps/coreutils-5.0-r3
23     app-arch/cpio
24     app-arch/gzip
25     app-arch/bzip2
26     app-arch/arc
27     app-arch/cabextract
28     app-arch/freeze
29     app-arch/lha
30     app-arch/ncompress
31     app-arch/pax
32     app-arch/unarj
33     app-arch/xz-utils
34     || ( app-arch/unrar app-arch/rar )
35     app-arch/zoo
36     >=dev-perl/Archive-Zip-1.14
37     >=virtual/perl-IO-Compress-1.35
38     >=virtual/perl-Compress-Raw-Zlib-2.017
39     dev-perl/Convert-TNEF
40     >=dev-perl/Convert-UUlib-1.08
41     virtual/perl-MIME-Base64
42     >=dev-perl/MIME-tools-5.415
43     >=dev-perl/MailTools-1.58
44     >=dev-perl/net-server-0.91
45     virtual/perl-Digest-MD5
46     dev-perl/IO-stringy
47     >=virtual/perl-Time-HiRes-1.49
48     dev-perl/Unix-Syslog
49     sys-apps/file
50     >=sys-libs/db-4.4.20
51     dev-perl/BerkeleyDB
52     dev-perl/Convert-BinHex
53     >=dev-perl/Mail-DKIM-0.31
54     virtual/mta
55     ldap? ( >=dev-perl/perl-ldap-0.33 )
56     mysql? ( dev-perl/DBD-mysql )
57     postgres? ( dev-perl/DBD-Pg )
58     razor? ( mail-filter/razor )
59     snmp? ( net-analyzer/net-snmp[perl] )
60     spamassassin? ( mail-filter/spamassassin )"
61    
62     AMAVIS_ROOT="/var/amavis"
63     S="${WORKDIR}/${MY_P}"
64    
65     src_prepare() {
66     if use courier ; then
67     epatch amavisd-new-courier.patch
68     fi
69    
70     if use qmail ; then
71     epatch amavisd-new-qmqpqq.patch
72     fi
73    
74     sed -i \
75     -e '/daemon/s/vscan/amavis/' \
76     -e "s:'/var/virusmails':\"\$MYHOME/quarantine\":" \
77     "${S}/amavisd.conf" || die "missing conf file"
78    
79     if ! use dkim ; then
80     sed -i -e '/enable_dkim/s/1/0/' "${S}/amavisd.conf" \
81     || die "missing conf file"
82     fi
83     }
84    
85     src_install() {
86     dosbin amavisd amavisd-agent amavisd-nanny amavisd-release \
87     amavisd-signer
88     dobin p0f-analyzer.pl amavisd-submit
89    
90     if use snmp ; then
91     dosbin amavisd-snmp-subagent
92     dodoc AMAVIS-MIB.txt
93     fi
94    
95     insinto /etc
96     insopts -m0640
97     doins amavisd.conf
98    
99     newinitd "${FILESDIR}/amavisd.initd" amavisd
100    
101     keepdir "${AMAVIS_ROOT}"
102     keepdir "${AMAVIS_ROOT}/db"
103     keepdir "${AMAVIS_ROOT}/quarantine"
104     keepdir "${AMAVIS_ROOT}/tmp"
105     keepdir "${AMAVIS_ROOT}/var"
106    
107     dodoc AAAREADME.first INSTALL MANIFEST RELEASE_NOTES TODO \
108     amavisd.conf-default amavisd-custom.conf
109    
110     docinto README_FILES
111     dodoc README_FILES/README*
112     dohtml README_FILES/*.{html,css}
113     docinto README_FILES/images
114     dodoc README_FILES/images/*.png
115     docinto README_FILES/images/callouts
116     dodoc README_FILES/images/callouts/*.png
117    
118     docinto test-messages
119     dodoc test-messages/README
120     dodoc test-messages/sample.tar.gz.compl
121    
122     #for i in whitelist blacklist spam_lovers; do
123     # if [ -f ${AMAVIS_ROOT}/${i} ]; then
124     # cp "${AMAVIS_ROOT}/${i}" "${D}/${AMAVIS_ROOT}"
125     # else
126     # touch "${D}"/${AMAVIS_ROOT}/${i}
127     # fi
128     #done
129    
130     if use ldap ; then
131     dodir /etc/openldap/schema
132     insinto /etc/openldap/schema
133     insopts -o root -g root -m 644
134     newins LDAP.schema ${PN}.schema || die
135     fi
136     }
137    
138     pkg_preinst() {
139     enewgroup amavis
140     enewuser amavis -1 -1 "${AMAVIS_ROOT}" amavis
141     if use razor ; then
142     if [ ! -d "${ROOT}${AMAVIS_ROOT}/.razor" ] ; then
143     elog "Setting up initial razor config files..."
144    
145     razor-admin -create -home="${D}/${AMAVIS_ROOT}/.razor"
146     sed -i -e "s:debuglevel\([ ]*\)= .:debuglevel\1= 0:g" \
147     "${D}/${AMAVIS_ROOT}/.razor/razor-agent.conf"
148     fi
149     fi
150    
151     if ! use spamassassin ; then
152     elog "Disabling anti-spam code in amavisd.conf..."
153     sed -i -e \
154     "/^#[[:space:]]*@bypass_spam_checks_maps[[:space:]]*=[[:space:]]*(1)/s/^#//" \
155     "${D}/etc/amavisd.conf"
156     fi
157    
158     if has_version "<${CATEGORY}/${PN}-2.7.0" ; then
159     elog "Amavisd-new ships with a short and condensed config file now."
160     elog "Transferring your current settings to the new format is"
161     elog "recommended for ease of future upgrades."
162     fi
163     }
164    
165     pkg_postinst() {
166     chown root:amavis "${ROOT}/etc/amavisd.conf"
167     chown -R amavis:amavis "${ROOT}/${AMAVIS_ROOT}"
168     }

  ViewVC Help
Powered by ViewVC 1.1.20