Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/amavisd-new/
Date: Thu, 27 Feb 2020 13:03:16
Message-Id: 1582808583.b100ea77be8256dea3f7a852d34cd6a4a06bc41b.candrews@gentoo
1 commit: b100ea77be8256dea3f7a852d34cd6a4a06bc41b
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 26 01:46:37 2020 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 27 13:03:03 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b100ea77
7
8 mail-filter/amavisd-new: Cleanup old version
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
12
13 .../amavisd-new/amavisd-new-2.12.0-r1.ebuild | 197 ---------------------
14 1 file changed, 197 deletions(-)
15
16 diff --git a/mail-filter/amavisd-new/amavisd-new-2.12.0-r1.ebuild b/mail-filter/amavisd-new/amavisd-new-2.12.0-r1.ebuild
17 deleted file mode 100644
18 index f10cddad89e..00000000000
19 --- a/mail-filter/amavisd-new/amavisd-new-2.12.0-r1.ebuild
20 +++ /dev/null
21 @@ -1,197 +0,0 @@
22 -# Copyright 1999-2020 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=7
26 -
27 -inherit systemd
28 -
29 -DESCRIPTION="High-performance interface between the MTA and content checkers"
30 -HOMEPAGE="https://gitlab.com/amavis/amavis"
31 -SRC_URI="https://gitlab.com/amavis/amavis/-/archive/v${PV}/amavis-v${PV}.tar.bz2"
32 -
33 -LICENSE="GPL-2 BSD-2"
34 -SLOT="0"
35 -KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
36 -IUSE="clamav courier dkim ldap mysql postgres qmail razor rspamd rspamd-https snmp spamassassin zmq"
37 -
38 -MY_RSPAMD_DEPEND="dev-perl/HTTP-Message
39 - dev-perl/JSON
40 - dev-perl/LWP-UserAgent-Determined"
41 -DEPEND="acct-user/amavis"
42 -RDEPEND="${DEPEND}
43 - app-arch/arc
44 - app-arch/bzip2
45 - app-arch/cabextract
46 - app-arch/cpio
47 - app-arch/gzip
48 - app-arch/lha
49 - app-arch/lrzip
50 - app-arch/lzop
51 - app-arch/ncompress
52 - app-arch/p7zip
53 - app-arch/pax
54 - app-arch/unarj
55 - app-arch/unrar
56 - app-arch/xz-utils
57 - app-arch/zoo
58 - dev-lang/perl:*
59 - dev-perl/BerkeleyDB
60 - dev-perl/Convert-BinHex
61 - dev-perl/File-LibMagic
62 - dev-perl/IO-Socket-SSL
63 - dev-perl/IO-stringy
64 - dev-perl/Net-SSLeay
65 - dev-perl/Unix-Syslog
66 - net-mail/ripole
67 - net-mail/tnef
68 - >=sys-apps/coreutils-5.0-r3
69 - >=sys-libs/db-4.4.20
70 - virtual/mta
71 - virtual/perl-Compress-Raw-Zlib
72 - virtual/perl-Digest-MD5
73 - virtual/perl-File-Temp
74 - virtual/perl-IO-Compress
75 - virtual/perl-IO-Socket-IP
76 - virtual/perl-MIME-Base64
77 - virtual/perl-Time-HiRes
78 - clamav? ( app-antivirus/clamav )
79 - ldap? ( >=dev-perl/perl-ldap-0.33 )
80 - mysql? ( dev-perl/DBD-mysql )
81 - postgres? ( dev-perl/DBD-Pg )
82 - razor? ( mail-filter/razor )
83 - rspamd? ( ${MY_RSPAMD_DEPEND} )
84 - rspamd-https? ( ${MY_RSPAMD_DEPEND}
85 - dev-perl/LWP-Protocol-https
86 - dev-perl/Net-SSLeay )
87 - snmp? ( net-analyzer/net-snmp[perl] )
88 - spamassassin? ( mail-filter/spamassassin dev-perl/Image-Info )
89 - zmq? ( dev-perl/ZMQ-LibZMQ3 )"
90 -
91 -AMAVIS_ROOT="/var/lib/amavishome"
92 -S="${WORKDIR}/amavis-v${PV}"
93 -
94 -src_prepare() {
95 - if use courier ; then
96 - eapply -p0 amavisd-new-courier.patch
97 - fi
98 -
99 - if use qmail ; then
100 - eapply -p0 amavisd-new-qmqpqq.patch
101 - fi
102 -
103 - # We need to fix the daemon_user and daemon_group in amavis-mc even
104 - # though we're going to run it in the foreground, because it calls
105 - # "drop_priv" unconditionally and will crash if its user/group
106 - # doesn't exist.
107 - sed -i \
108 - -e '/daemon/s/vscan/amavis/' \
109 - -e "s:'/var/virusmails':\"\$MYHOME/quarantine\":" \
110 - "${S}/amavisd.conf" "${S}/amavis-mc" || die "missing conf file"
111 -
112 - if ! use dkim ; then
113 - sed -i -e '/enable_dkim/s/1/0/' "${S}/amavisd.conf" \
114 - || die "missing conf file - dkim"
115 - fi
116 -
117 - if use zmq ; then
118 - sed -i -e '/enable_zmq/s/# //' "${S}/amavisd.conf" \
119 - || die "missing conf file - zmq"
120 - fi
121 -
122 - if ! use spamassassin ; then
123 - sed -i -e \
124 - "/^#[[:space:]]*@bypass_spam_checks_maps[[:space:]]*=[[:space:]]*(1)/s/^#//" \
125 - "${S}/amavisd.conf" || die "missing conf file - sa"
126 - fi
127 -
128 - eapply_user
129 -}
130 -
131 -src_install() {
132 - dosbin amavisd{,-agent,-nanny,-release,-signer,-status}
133 - dobin p0f-analyzer.pl amavisd-submit
134 -
135 - if use snmp ; then
136 - dosbin amavisd-snmp-subagent
137 - newinitd "${FILESDIR}/amavisd-snmp-subagent.initd" \
138 - amavisd-snmp-subagent
139 - dodoc AMAVIS-MIB.txt
140 -
141 - if use zmq ; then
142 - dosbin amavisd-snmp-subagent-zmq
143 - newinitd "${FILESDIR}/amavisd-snmp-subagent-zmq.initd" \
144 - amavisd-snmp-subagent-zmq
145 - fi
146 - fi
147 -
148 - if use zmq ; then
149 - dosbin amavis-services amavis-mc
150 - newinitd "${FILESDIR}/amavis-mc.initd-r1" amavis-mc
151 - fi
152 -
153 - if use ldap ; then
154 - insinto /etc/openldap/schema
155 - newins LDAP.schema "${PN}.schema"
156 - fi
157 -
158 - # The config file should be root:amavis so that the amavis user can
159 - # read (only) it after dropping privileges. And of course he should
160 - # own everything in his home directory.
161 - insinto /etc
162 - insopts -m0640 -g amavis
163 - doins amavisd.conf
164 -
165 - # Implementation detail? Keepdir calls dodir under the hood.
166 - diropts -o amavis -g amavis
167 - keepdir "${AMAVIS_ROOT}"/{,db,quarantine,tmp,var}
168 -
169 - # BEWARE:
170 - #
171 - # Anything below this line is using the mangled insopts/diropts from
172 - # above!
173 - #
174 -
175 - newinitd "${FILESDIR}/amavisd.initd-r2" amavisd
176 -
177 - systemd_newunit "${FILESDIR}/amavisd.service-r1" amavisd.service
178 -
179 - dodoc AAAREADME.first INSTALL MANIFEST RELEASE_NOTES TODO \
180 - amavisd.conf-default amavisd-custom.conf
181 -
182 - docinto README_FILES
183 - dodoc README_FILES/README*
184 - dodoc -r README_FILES/*.{html,css}
185 - docinto README_FILES/images
186 - dodoc README_FILES/images/*.png
187 - docinto README_FILES/images/callouts
188 - dodoc README_FILES/images/callouts/*.png
189 -
190 - docinto test-messages
191 - dodoc test-messages/README
192 - dodoc test-messages/sample.tar.gz.compl
193 -}
194 -
195 -pkg_preinst() {
196 - # TODO: the following is done as root, but should probably be done
197 - # as the amavis user.
198 - if use razor ; then
199 - if [ ! -d "${ROOT}${AMAVIS_ROOT}/.razor" ] ; then
200 - elog "Setting up initial razor config files..."
201 -
202 - razor-admin -create -home="${D}/${AMAVIS_ROOT}/.razor"
203 - sed -i -e "s:debuglevel\([ ]*\)= .:debuglevel\1= 0:g" \
204 - "${D}/${AMAVIS_ROOT}/.razor/razor-agent.conf" || die
205 - fi
206 - fi
207 -}
208 -
209 -pkg_postinst() {
210 - local d="/var/amavis"
211 - if [ -d ${d} ]; then
212 - elog "Existing data found. Please make sure to manually copy it to amavis' new"
213 - elog "home directory by executing the following command as root from a shell:"
214 - elog
215 - elog " cp -a ${d}/* ${d}/.??* ${AMAVIS_ROOT}/ && rm -r ${d}"
216 - elog
217 - fi
218 -}