Gentoo Archives: gentoo-commits

From: "Torsten Veller (tove)" <tove@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-filter/spamassassin: ChangeLog spamassassin-3.2.5-r2.ebuild
Date: Sat, 02 Jan 2010 06:37:12
Message-Id: E1NQxbl-0004re-Rh@stork.gentoo.org
1 tove 10/01/02 06:37:05
2
3 Modified: ChangeLog
4 Added: spamassassin-3.2.5-r2.ebuild
5 Log:
6 Apply FH_DATE_PAST_20XX to the testing version too
7 (Portage version: 2.2_rc61/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.166 mail-filter/spamassassin/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/spamassassin/ChangeLog?rev=1.166&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/spamassassin/ChangeLog?rev=1.166&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/spamassassin/ChangeLog?r1=1.165&r2=1.166
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/mail-filter/spamassassin/ChangeLog,v
19 retrieving revision 1.165
20 retrieving revision 1.166
21 diff -u -r1.165 -r1.166
22 --- ChangeLog 2 Jan 2010 00:00:05 -0000 1.165
23 +++ ChangeLog 2 Jan 2010 06:37:05 -0000 1.166
24 @@ -1,6 +1,12 @@
25 # ChangeLog for mail-filter/spamassassin
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin/ChangeLog,v 1.165 2010/01/02 00:00:05 klausman Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin/ChangeLog,v 1.166 2010/01/02 06:37:05 tove Exp $
29 +
30 +*spamassassin-3.2.5-r2 (02 Jan 2010)
31 +
32 + 02 Jan 2010; Torsten Veller <tove@g.o>
33 + +spamassassin-3.2.5-r2.ebuild:
34 + Apply FH_DATE_PAST_20XX to the testing version too
35
36 01 Jan 2010; Tobias Klausmann <klausman@g.o>
37 spamassassin-3.2.1-r2.ebuild:
38
39
40
41 1.1 mail-filter/spamassassin/spamassassin-3.2.5-r2.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/spamassassin/spamassassin-3.2.5-r2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/spamassassin/spamassassin-3.2.5-r2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: spamassassin-3.2.5-r2.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin/spamassassin-3.2.5-r2.ebuild,v 1.1 2010/01/02 06:37:05 tove Exp $
51
52 inherit perl-module eutils
53
54 MY_P=Mail-SpamAssassin-${PV//_/-}
55 S=${WORKDIR}/${MY_P}
56 DESCRIPTION="SpamAssassin is an extensible email filter which is used to identify spam."
57 HOMEPAGE="http://spamassassin.apache.org/"
58 SRC_URI="http://archive.apache.org/dist/spamassassin/source/${MY_P}.tar.bz2 mirror://gentoo/${MY_P}.tar.bz2"
59
60 SRC_TEST="do"
61 LICENSE="Apache-2.0"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
64 IUSE="berkdb qmail ssl doc ldap mysql postgres sqlite tools ipv6"
65
66 DEPEND=">=dev-lang/perl-5.8.2-r1
67 virtual/perl-MIME-Base64
68 >=virtual/perl-PodParser-1.32
69 virtual/perl-Storable
70 virtual/perl-Time-HiRes
71 >=dev-perl/HTML-Parser-3.43
72 >=dev-perl/Net-DNS-0.53
73 dev-perl/Digest-SHA1
74 dev-perl/libwww-perl
75 >=virtual/perl-Archive-Tar-1.26
76 app-crypt/gnupg
77 >=virtual/perl-IO-Zlib-1.04
78 >=dev-util/re2c-0.12.0
79 ssl? (
80 dev-perl/IO-Socket-SSL
81 dev-libs/openssl
82 )
83 berkdb? (
84 virtual/perl-DB_File
85 )
86 ldap? ( dev-perl/perl-ldap )
87 mysql? (
88 dev-perl/DBI
89 dev-perl/DBD-mysql
90 )
91 postgres? (
92 dev-perl/DBI
93 dev-perl/DBD-Pg
94 )
95 sqlite? (
96 dev-perl/DBI
97 dev-perl/DBD-SQLite
98 )
99
100 ipv6? (
101 dev-perl/IO-Socket-INET6
102 )"
103
104 PATCHES=( "${FILESDIR}/${PN}-3.2.5-DESTDIR.patch"
105 "${FILESDIR}/FH_DATE_PAST_20XX.patch" )
106
107 src_compile() {
108 # - Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
109 # (just to be sure, nobody knows how it could happen in the first place).
110 myconf="SYSCONFDIR=/etc DATADIR=/usr/share/spamassassin"
111
112 # If ssl is enabled, spamc can be built with ssl support
113 if use ssl; then
114 myconf="${myconf} ENABLE_SSL=yes"
115 else
116 myconf="${myconf} ENABLE_SSL=no"
117 fi
118
119 # Set the path to the Perl executable explictly. This will be used to
120 # create the initial sharpbang line in the scripts and might cause
121 # a versioned app name end in there, see
122 # <http://bugs.gentoo.org/show_bug.cgi?id=62276>
123 myconf="${myconf} PERL_BIN=/usr/bin/perl"
124
125 # If you are going to enable taint mode, make sure that the bug where
126 # spamd doesn't start when the PATH contains . is addressed, and make
127 # sure you deal with versions of razor <2.36-r1 not being taint-safe.
128 # <http://bugzilla.spamassassin.org/show_bug.cgi?id=2511> and
129 # <http://spamassassin.org/released/Razor2.patch>.
130 myconf="${myconf} PERL_TAINT=no"
131
132 # No settings needed for 'make all'.
133 mymake=""
134
135 # Neither for 'make install'.
136 myinst=""
137
138 # Add Gentoo tag to make it easier for the upstream devs to spot
139 # possible modifications or patches.
140 version_tag="g${PV:6}${PR}"
141 version_str="${PV//_/-}-${version_tag}"
142
143 # Create the Gentoo config file before Makefile.PL is called so it
144 # is copied later on.
145 echo "version_tag ${version_tag}" > rules/11_gentoo.cf
146
147 # Setting the following env var ensures that no questions are asked.
148 export PERL_MM_USE_DEFAULT=1
149 perl-module_src_prep
150 # Run the autoconf stuff now, just to make the build sequence look more
151 # familiar to the user :) Plus feeding the VERSION_STRING skips some
152 # calls to Perl.
153 make spamc/Makefile VERSION_STRING="${version_str}"
154
155 # Now compile all the stuff selected.
156 perl-module_src_compile
157 if use qmail; then
158 make spamc/qmail-spamc || die building qmail-spamc failed
159 fi
160
161 # Remove the MANIFEST files as they aren't docu files
162 rm -f MANIFEST*
163
164 use doc && make text_html_doc
165 }
166
167 src_test() {
168 perl-module_src_test
169 }
170
171 src_install () {
172 perl-module_src_install
173
174 # Create the stub dir used by sa-update and friends
175 dodir /var/lib/spamassassin
176
177 # Move spamd to sbin where it belongs.
178 dodir /usr/sbin
179 mv "${D}"/usr/bin/spamd "${D}"/usr/sbin/spamd || die
180
181 use qmail && dobin spamc/qmail-spamc
182
183 dosym /etc/mail/spamassassin /etc/spamassassin
184
185 # Disable plugin by default
186 sed -i -e 's/^loadplugin/\#loadplugin/g' "${D}"/etc/mail/spamassassin/init.pre
187
188 # Add the init and config scripts.
189 newinitd "${FILESDIR}"/3.0.0-spamd.init spamd
190 newconfd "${FILESDIR}"/3.0.0-spamd.conf spamd
191
192 if use doc; then
193 dodoc NOTICE TRADEMARK CREDITS INSTALL INSTALL.VMS UPGRADE USAGE \
194 sql/README.bayes sql/README.awl procmailrc.example sample-nonspam.txt \
195 sample-spam.txt spamassassin.spec spamd/PROTOCOL spamd/README.vpopmail \
196 spamd-apache2/README.apache
197
198 # Rename some docu files so they don't clash with others
199 newdoc spamd/README README.spamd
200 newdoc sql/README README.sql
201 newdoc ldap/README README.ldap
202 use qmail && newdoc spamc/README.qmail README.qmail
203
204 dohtml doc/*.html
205 docinto sql
206 dodoc sql/*.sql
207 fi
208
209 # Install provided tools. See bug 108168
210 if use tools; then
211 docinto tools
212 dodoc tools/*
213 fi
214
215 cp "${FILESDIR}"/secrets.cf "${D}"/etc/mail/spamassassin/secrets.cf.example
216 fperms 0400 /etc/mail/spamassassin/secrets.cf.example
217 echo "">>${D}/etc/mail/spamassassin/local.cf.example
218 echo "# Sensitive data, such as database connection info, should">>${D}/etc/mail/spamassassin/local.cf.example
219 echo "# be stored in /etc/mail/spamassassin/secrets.cf with">>${D}/etc/mail/spamassassin/local.cf.example
220 echo "# appropriate permissions">>${D}/etc/mail/spamassassin/local.cf.example
221 }
222
223 pkg_postinst() {
224 perl-module_pkg_postinst
225
226 if ! has_version "perl-core/DB_File"; then
227 einfo "The Bayes backend requires the Berkeley DB to store its data. You"
228 einfo "need to emerge perl-core/DB_File or USE=berkdb to make it available."
229 fi
230
231 if has_version "mail-filter/razor"; then
232 if ! has_version ">=mail-filter/razor-2.61"; then
233 ewarn "You have $(best_version mail-filter/razor) installed but SpamAssassin"
234 if has_version "<mail-filter/razor-2.40"; then
235 ewarn "requires at least version 2.40, version 2.61 or later is recommended."
236 else
237 ewarn "recommends at least version 2.61."
238 fi
239 fi
240 fi
241
242 if use doc; then
243 einfo
244 einfo "Please read the file INSTALL in"
245 einfo " /usr/share/doc/${PF}/"
246 einfo "to find out which optional modules you need to install to enable"
247 einfo "additional features which depend on them."
248 einfo
249 einfo "If upgraded from 2.x, please read the file UPGRADE in"
250 einfo " /usr/share/doc/${PF}/"
251 einfo
252 fi
253
254 ewarn
255 ewarn "spamd is not designed to listen to an untrusted network"
256 ewarn "and is vulnerable to DoS attacks (and eternal doom) if"
257 ewarn "configured to do so"
258 ewarn
259 elog "If you plan on using the -u flag to spamd, please read the notes"
260 elog "in /etc/conf.d/spamd regarding the location of the pid file."
261
262 einfo
263 einfo "If you build ${PN} with optional dependancy support,"
264 einfo "you can enable them in /etc/mail/spamassassin/init.pre"
265 einfo
266
267 if has_version '>=dev-lang/perl-5.8.8'; then
268 elog "A note from the SA developers:"
269 elog "Perl 5.8 now uses Unicode internally by default, which causes trouble for"
270 elog "SpamAssassin (and almost all other reasonably complex pieces of perl"
271 elog "code!)."
272 elog ""
273 elog "We've worked around this in most places, as far as we know, but there may"
274 elog "still be some issues. In addition, there is a speed hit, which it would"
275 elog "be nice to avoid."
276 elog ""
277 elog "Setting the LANG environment variable before any invocation of"
278 elog "SpamAssassin sometimes seems to help fix it, like so:"
279 elog ""
280 elog " export LANG=en_US"
281 elog ""
282 elog "Notably, the LANG setting must not include \"utf8\". However, some folks"
283 elog "have reported that this makes no difference. ;)"
284 fi
285 einfo
286 if ! has_version 'dev-perl/Mail-SPF-Query'; then
287 elog "For spf support, please emerge dev-perl/Mail-SPF-Query"
288 fi
289 if ! has_version 'mail-filter/dcc'; then
290 elog "For dcc support, please emerge mail-filter/dcc"
291 fi
292 if ! has_version 'dev-python/pyzor'; then
293 elog "For pyzor support, please emerge dev-python/pyzor"
294 fi
295 if ! has_version 'mail-filter/razor'; then
296 elog "For razor support, please emerge mail-filter/razor"
297 fi
298 einfo
299 elog "For addtional functionality, you may wish to emerge:"
300 elog "dev-perl/IP-Country dev-perl/Net-Ident "
301 elog "dev-perl/Mail-DKIM"
302
303 }