1 | |
---|
2 | %define pdir Mail |
---|
3 | %define pnam SpamAssassin |
---|
4 | |
---|
5 | %define version 3.2.5 |
---|
6 | %define real_version 3.2.5 |
---|
7 | %define release 1%{_dist_release} |
---|
8 | %define cfdate 20080224 |
---|
9 | %define name spamassassin |
---|
10 | %define _initrddir /etc/rc.d/init.d/ |
---|
11 | %define initdir %{_initrddir} |
---|
12 | %define __find_provides /usr/lib/rpm/find-provides.perl |
---|
13 | %define __find_requires /usr/lib/rpm/find-requires.perl |
---|
14 | |
---|
15 | Summary: a spam filter for email which can be invoked from mail delivery agents |
---|
16 | Summary(ja): MDA から起動できる spam email filter |
---|
17 | Group: Applications/Internet |
---|
18 | Name: %{name} |
---|
19 | Version: %{version} |
---|
20 | Release: %{release} |
---|
21 | License: Apache License 2.0 |
---|
22 | URL: http://spamassassin.org/ |
---|
23 | Source0: http://spamassassin.org/released/Mail-SpamAssassin-%{real_version}.tar.bz2 |
---|
24 | Source1: sample-japanese-local.cf-%{cfdate} |
---|
25 | Source2: README.vine |
---|
26 | Source3: filter.sh |
---|
27 | Source4: sa-update.cronscript |
---|
28 | Source5: sa-update.crontab |
---|
29 | Source6: sa-update.logrotate |
---|
30 | Patch0: spamassassin-3.1.7_rules.patch |
---|
31 | Buildroot: %{_tmppath}/%{name}-%{version}-root |
---|
32 | Prereq: /sbin/chkconfig |
---|
33 | Prereq: perl-Mail-SpamAssassin = %{version}-%{release} |
---|
34 | Prereq: spamassassin-tools = %{version}-%{release} |
---|
35 | Requires: perl >= 1:5.10.0 |
---|
36 | Requires: perl(Pod::Usage), perl(HTML::Parser) >= 3.43 perl(Digest::SHA1) |
---|
37 | Requires: perl(Net::DNS) |
---|
38 | # sa-update's Requires |
---|
39 | Requires: perl(Archive::Tar) >= 1.23 perl(IO::Zlib) >= 1.04 perl(LWP) |
---|
40 | |
---|
41 | BuildPrereq: perl >= 1:5.10.0 perl(HTML::Parser) >= 3.43 perl(Digest::SHA1) |
---|
42 | BuildPrereq: perl(Archive::Tar) >= 1.23 perl(IO::Zlib) >= 1.04 |
---|
43 | BuildPrereq: perl(Net::DNS) |
---|
44 | |
---|
45 | Vendor: Project Vine |
---|
46 | Distribution: Vine Linux |
---|
47 | |
---|
48 | %description |
---|
49 | SpamAssassin provides you with a way to reduce if not completely eliminate |
---|
50 | Unsolicited Commercial Email (spam) from your incoming email. It can |
---|
51 | be invoked by a MDA such as sendmail or postfix, or can be called from |
---|
52 | a procmail script, .forward file, etc. It uses a genetic-algorithm |
---|
53 | evolved scoring system to identify messages which look spammy, then |
---|
54 | adds headers to the message so they can be filtered by the user's mail |
---|
55 | reading software. This distribution includes the spamd/spamc components |
---|
56 | which create a server that considerably speeds processing of mail. |
---|
57 | |
---|
58 | %description -l ja |
---|
59 | SpamAssassin は商用電子メール(スパム)を除去する手段を提供する filter です。 |
---|
60 | |
---|
61 | sendmail または postfix のような MDA から SpamAssassin を起動することが |
---|
62 | 可能です。 |
---|
63 | また procmail スクリプト、.forward ファイルなどからも呼ぶことができます。 |
---|
64 | |
---|
65 | SpamAssassin は、スパムメッセージを識別するために遺伝的アルゴリズムを |
---|
66 | 発展させた、得点システムを使用しています。 |
---|
67 | ユーザのメールソフト (MUA) がそれらをフィルタリングすることができるように、 |
---|
68 | メッセージにヘッダーを加えます。 |
---|
69 | また、メイルの処理速度を要求されるサーバーで用いる spamd/spamc コンポー |
---|
70 | ネントを含んでいます。 |
---|
71 | |
---|
72 | 日本語のスパムメール用の local.cf を含めています。 |
---|
73 | /usr/doc/spamassassin-*/sample-japanese-local.conf を見てください。 |
---|
74 | |
---|
75 | %package tools |
---|
76 | Summary: Miscellaneous tools for SpamAssassin |
---|
77 | Summary(ja): SpamAssassin 向けの各種ツール |
---|
78 | Group: Applications/Internet |
---|
79 | Prereq: perl-Mail-SpamAssassin = %{version}-%{release} |
---|
80 | Requires: perl >= 1:5.6.1 |
---|
81 | Autoreq: no |
---|
82 | |
---|
83 | %description tools |
---|
84 | Miscellaneous tools from various authors, distributed with SpamAssassin. |
---|
85 | See /usr/share/doc/SpamAssassin-tools-*/. |
---|
86 | |
---|
87 | %package -n perl-Mail-SpamAssassin |
---|
88 | Summary: %{pdir}::%{pnam} -- SpamAssassin e-mail filter Perl modules |
---|
89 | Requires: perl >= 1:5.6.1 perl(Pod::Usage) perl(HTML::Parser) >= 3.43 |
---|
90 | Group: Development/Libraries |
---|
91 | |
---|
92 | %description -n perl-Mail-SpamAssassin |
---|
93 | Mail::SpamAssassin is a module to identify spam using text analysis and |
---|
94 | several internet-based realtime blacklists. Using its rule base, it uses a |
---|
95 | wide range of heuristic tests on mail headers and body text to identify |
---|
96 | ``spam'', also known as unsolicited commercial email. Once identified, the |
---|
97 | mail can then be optionally tagged as spam for later filtering using the |
---|
98 | user's own mail user-agent application. |
---|
99 | |
---|
100 | %prep -q |
---|
101 | %setup -q -n %{pdir}-%{pnam}-%{real_version} |
---|
102 | # %setup -D -a 1 -T -n %{pdir}-%{pnam}-%{real_version} |
---|
103 | |
---|
104 | %patch0 -p0 -b .rules |
---|
105 | |
---|
106 | # Japanese sample file / README |
---|
107 | cp -p %{SOURCE1} sample-japanese-local.cf |
---|
108 | cp -p %{SOURCE2} README.vine |
---|
109 | cp -p %{SOURCE3} filter.sh |
---|
110 | # sa-update sample |
---|
111 | cp -p %{SOURCE4} . |
---|
112 | cp -p %{SOURCE5} . |
---|
113 | cp -p %{SOURCE6} . |
---|
114 | # change README filename |
---|
115 | cp spamd/README spamd/README.spamd |
---|
116 | |
---|
117 | %build |
---|
118 | CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS |
---|
119 | %{__perl} Makefile.PL INSTALLDIRS=vendor < /dev/null |
---|
120 | %{__make} |
---|
121 | %{__make} spamd/libspamc.so |
---|
122 | |
---|
123 | %install |
---|
124 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
---|
125 | |
---|
126 | make DESTDIR=$RPM_BUILD_ROOT install |
---|
127 | |
---|
128 | install -d $RPM_BUILD_ROOT/%{initdir} |
---|
129 | install -m 0755 spamd/redhat-rc-script.sh $RPM_BUILD_ROOT/%{initdir}/spamassassin |
---|
130 | mkdir -p $RPM_BUILD_ROOT/etc/mail/spamassassin |
---|
131 | mkdir -p $RPM_BUILD_ROOT/var/spool/spamassassin |
---|
132 | |
---|
133 | # [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
---|
134 | |
---|
135 | %clean |
---|
136 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
---|
137 | |
---|
138 | %post |
---|
139 | # install |
---|
140 | # if [ $1 = 1 ]; then |
---|
141 | # /sbin/chkconfig --add spamassassin |
---|
142 | # fi |
---|
143 | |
---|
144 | # update |
---|
145 | if [ $1 = 2 ]; then |
---|
146 | if [ -x /usr/bin/sa-learn ] ; then |
---|
147 | echo "Sync DB (sa-learn --sync)" |
---|
148 | /usr/bin/sa-learn --sync |
---|
149 | fi |
---|
150 | if [ -f /var/lock/subsys/spamassassin ]; then |
---|
151 | echo "restarting spamd" |
---|
152 | %{initdir}/spamassassin restart |
---|
153 | else |
---|
154 | echo 'If you use spamd,' |
---|
155 | echo ' "/etc/rc.d/init.d/spamassassin start"' |
---|
156 | echo 'to start the spamd daemon.' |
---|
157 | fi |
---|
158 | fi |
---|
159 | |
---|
160 | %pre -n perl-Mail-SpamAssassin |
---|
161 | # update |
---|
162 | if [ $1 = 2 ]; then |
---|
163 | if [ -x /usr/bin/sa-learn ] ; then |
---|
164 | echo "Sync DB (sa-learn --sync)" |
---|
165 | /usr/bin/sa-learn --sync ||: |
---|
166 | fi |
---|
167 | fi |
---|
168 | |
---|
169 | %preun |
---|
170 | # remove |
---|
171 | if [ $1 = 0 ]; then |
---|
172 | if [ -f /var/lock/subsys/spamassassin ]; then |
---|
173 | %{initdir}/spamassassin stop 1>&2 |
---|
174 | fi |
---|
175 | /sbin/chkconfig --del spamassassin |
---|
176 | fi |
---|
177 | |
---|
178 | %files |
---|
179 | %defattr(-,root,root) |
---|
180 | %doc CREDITS Changes INSTALL INSTALL.VMS LICENSE MANIFEST MANIFEST.SKIP |
---|
181 | %doc NOTICE PACKAGING README README.vine TRADEMARK UPGRADE USAGE |
---|
182 | %doc sql |
---|
183 | %doc filter.sh |
---|
184 | %doc sample-nonspam.txt sample-spam.txt |
---|
185 | %doc spamd/README.spamd |
---|
186 | %doc sample-japanese-local.cf |
---|
187 | %doc sa-update.* |
---|
188 | %attr(755,root,root) %{_bindir}/* |
---|
189 | %config %attr(755,root,root) %{initdir}/spamassassin |
---|
190 | %{_mandir}/man1/* |
---|
191 | |
---|
192 | %files -n spamassassin-tools |
---|
193 | %defattr(644,root,root,755) |
---|
194 | %doc sql |
---|
195 | |
---|
196 | %files -n perl-Mail-SpamAssassin |
---|
197 | %defattr(644,root,root,755) |
---|
198 | %{perl_vendorlib}/Mail/* |
---|
199 | %{perl_vendorlib}/spamassassin-run.pod |
---|
200 | |
---|
201 | %config(noreplace) %{_sysconfdir}/mail/spamassassin |
---|
202 | %{_datadir}/spamassassin |
---|
203 | %{_mandir}/man3/* |
---|
204 | %attr(775,root,root) /var/spool/spamassassin |
---|
205 | |
---|
206 | %changelog |
---|
207 | * Mon Jun 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.5-1 |
---|
208 | - new upstream release. |
---|
209 | - wrote spec in UTF-8. |
---|
210 | - updated sample-japanese-local.cf. |
---|
211 | |
---|
212 | * Thu May 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> |
---|
213 | - 3.2.4-1 |
---|
214 | - rebuilt with perl-5.10.0. |
---|
215 | |
---|
216 | * Sun Feb 24 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
217 | - 3.2.4-0vl1 |
---|
218 | - new upstream release (built for VineSeed) |
---|
219 | - update Requires/BuildRequires tag perl(HTML::Parser) >= 3.43 |
---|
220 | - enable Requires for sa-update |
---|
221 | - remove "(noreplace)" from init script |
---|
222 | - remove Vine 3.x if-endif section |
---|
223 | - remove script for upgrading from sa 2.x |
---|
224 | - turn on daemon restart message |
---|
225 | - update sample-japanese-local.cf |
---|
226 | |
---|
227 | * Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 3.2.3-0vl1 |
---|
228 | - new upstream release |
---|
229 | |
---|
230 | * Thu Feb 20 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
231 | - 3.1.8-0vl2 |
---|
232 | - rebuilt for VinePlus 4.x |
---|
233 | - installed perl modules to vendor_perl dir |
---|
234 | |
---|
235 | * Sun Feb 18 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
236 | - 3.1.8-0vl1 |
---|
237 | - built for VinePlus 3.x |
---|
238 | - installed perl modules to site_perl dir |
---|
239 | - add restart spamd process automactically (update) |
---|
240 | |
---|
241 | - * Thu Dec 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
242 | - 3.1.7-0vl1.1 |
---|
243 | - fix file list |
---|
244 | - sample-japanese-local.cf update |
---|
245 | - README.vine update |
---|
246 | |
---|
247 | * Sun Feb 18 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
248 | - 3.1.8-0vl0.1 |
---|
249 | - test package (not released) |
---|
250 | - built for VinePlus 4.0 |
---|
251 | - new upstream release with security fix (CVE-2007-0451) |
---|
252 | - add Source4,5,6 for sa-update sample file |
---|
253 | |
---|
254 | * Tue Nov 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
255 | - 3.1.7-0vl3 |
---|
256 | - fix file list |
---|
257 | - sample-japanese-local.cf update |
---|
258 | - README.vine update |
---|
259 | - fix changelog missing |
---|
260 | |
---|
261 | * Mon Oct 16 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
262 | - 3.1.7-0vl2 |
---|
263 | - built for VinePlus 4.0 |
---|
264 | - This package is based on VinePlus 3.x package |
---|
265 | - installed perl modules to vendor_perl dir |
---|
266 | |
---|
267 | - * Tue Jul 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.64-0vl3 |
---|
268 | - rebuilt with perl 5.8.6 |
---|
269 | - changed Group to Applications/Internet |
---|
270 | - installed perl modules to vendor_perl dir |
---|
271 | |
---|
272 | * Sat Oct 14 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
273 | - 3.1.7-0vl1 |
---|
274 | - new upstream release |
---|
275 | - add %pre -n perl-Mail-SpamAssassin script for updating package |
---|
276 | - add README.vine filter.sh |
---|
277 | - change License to Apache License 2.0 |
---|
278 | |
---|
279 | * Sat Oct 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
280 | - 3.1.5-0vl1 |
---|
281 | - new upstream release |
---|
282 | - built for VinePlus 3.2 |
---|
283 | |
---|
284 | * Sat Nov 27 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
285 | - 2.64-0vl2 |
---|
286 | - rebuild for VinePlus 3.0 |
---|
287 | |
---|
288 | * Sat Nov 27 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
289 | - 2.64-0vl1 |
---|
290 | - rebuild for VinePlus 2.5/2.6 |
---|
291 | - Source version up |
---|
292 | - Sample-japanese-local.cf update |
---|
293 | |
---|
294 | * Sun Apr 10 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
295 | - 2.63-0vl4 |
---|
296 | - rebuild for VineSeed Plus |
---|
297 | - Sample-japanese-local.cf update |
---|
298 | |
---|
299 | * Mon Apr 05 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
300 | - 2.63-0vl3 |
---|
301 | - Source version up |
---|
302 | - Sample-japanese-local.cf update |
---|
303 | |
---|
304 | * Sun Apr 04 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
305 | - 2.63-0vl2 |
---|
306 | - Source version up |
---|
307 | - Sample-japanese-local.cf update |
---|
308 | |
---|
309 | * Sat Dec 23 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
310 | - 2.61-0vl1 |
---|
311 | - Source version up |
---|
312 | - Sample-japanese-local.cf update |
---|
313 | - Change make & install method for 2.61 |
---|
314 | - fix Require |
---|
315 | - add post/preun script for update from 2.5x |
---|
316 | - add Vendor/Distribution tag |
---|
317 | |
---|
318 | * Sat May 24 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
319 | - 2.55-0vl2 |
---|
320 | - Sample-japanese-local.cf update |
---|
321 | |
---|
322 | * Sat May 24 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
323 | - 2.55-0vl1 |
---|
324 | - Source version up |
---|
325 | |
---|
326 | * Fri Apr 25 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
327 | - 2.53-0vl1 |
---|
328 | - Source version up |
---|
329 | - Sample-japanese-local.cf update |
---|
330 | |
---|
331 | * Fri Mar 28 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
332 | - 2.52-0vl1 |
---|
333 | - Source version up |
---|
334 | |
---|
335 | * Thu Feb 06 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
336 | - 2.44-0vl1 |
---|
337 | - Source version up |
---|
338 | - Sample-japanese-local.cf update |
---|
339 | - Fix japanese discription |
---|
340 | |
---|
341 | * Wed Oct 23 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
342 | - 2.43-0vl2 |
---|
343 | - Update & fix sample-japanese-local.cf |
---|
344 | |
---|
345 | * Fri Oct 18 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
346 | - 2.43-0vl1 |
---|
347 | - Source version up |
---|
348 | - Change make & install method for 2.43 |
---|
349 | - Update sample-japanese-local.cf |
---|
350 | - Thanx to MATSUDA Yoh-ichi <matsuda@palnet.or.jp> san |
---|
351 | - Change Buildprereq, Requires (perl 5.6.0 -> 5.6.1) for Vine 2.5 |
---|
352 | - Add doc qmail |
---|
353 | - Fix cvs version tags (Patch0) |
---|
354 | |
---|
355 | * Thu Oct 10 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
356 | - 2.42-3vl3 |
---|
357 | - stop install sample-japanese-local.cf to /etc/mail/spamassassin |
---|
358 | - add japanese discription |
---|
359 | - Fix Buildrequires |
---|
360 | |
---|
361 | * Tue Oct 08 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
362 | - 2.42-3vl2 |
---|
363 | - Fix Requires, Buildrequires |
---|
364 | - add local.cf for Japanese (from Linux-Users ML spam filter) |
---|
365 | |
---|
366 | * Mon Oct 07 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> |
---|
367 | - 2.42-3vl1 |
---|
368 | - first build for Vine Linux |
---|
369 | - NO run post/preun script |
---|
370 | - add requires perl(Time::HiRes) |
---|
371 | - add define _initrcdir |
---|
372 | |
---|
373 | * Sat Oct 05 2002 Theo Van Dinter <felicity@kluge.net> -3 |
---|
374 | - fixed some small typos in the spec file |
---|
375 | |
---|
376 | * Fri Oct 04 2002 Theo Van Dinter <felicity@kluge.net> -2 |
---|
377 | - small bug where 2.42 still called itself 2.42-cvs |
---|
378 | |
---|
379 | * Fri Oct 04 2002 Theo Van Dinter <felicity@kluge.net> -1 |
---|
380 | - updated to SA 2.42 |
---|
381 | |
---|
382 | * Wed Sep 11 2002 Justin Mason <jm-spec@jmason.org> |
---|
383 | - spamassassin RPM now requires perl-Mail-SpamAssassin; from Theo |
---|
384 | |
---|
385 | * Tue Sep 03 2002 Theo Van Dinter <felicity@kluge.net> |
---|
386 | - added INSTALL to documentation files |
---|
387 | - install man pages via _manpage macro to make things consistent |
---|
388 | - added perl requires statement |
---|
389 | - cleaned out some cruft |
---|
390 | - fixed "file listed twice" bug |
---|
391 | |
---|
392 | * Wed Aug 28 2002 Justin Mason <jm-spec@jmason.org> |
---|
393 | - merged code from PLD rpm, split into spamassassin, perl-Mail-SpamAssassin, |
---|
394 | and spamassassin-tools rpms |
---|
395 | |
---|
396 | * Mon Jul 29 2002 Justin Mason <jm-spec@jmason.org> |
---|
397 | - removed migrate_cfs code, obsolete |
---|
398 | |
---|
399 | * Thu Jul 25 2002 Justin Mason <jm-spec@jmason.org> |
---|
400 | - removed findbin patch, obsolete |
---|
401 | |
---|
402 | * Fri Apr 19 2002 Theo Van Dinter <felicity@kluge.net> |
---|
403 | - Updated for 2.20 release |
---|
404 | - made /etc/mail/spamassassin a config directory so local.cf doesn't get wiped out |
---|
405 | - added a patch to remove findbin stuff |
---|
406 | |
---|
407 | * Wed Feb 27 2002 Craig Hughes <craig@hughes-family.org> |
---|
408 | - Updated for 2.1 release |
---|
409 | |
---|
410 | * Sat Feb 02 2002 Theo Van Dinter <felicity@kluge.net> |
---|
411 | - Updates for 2.01 release |
---|
412 | - Fixed rc file |
---|
413 | - RPM now buildable as non-root |
---|
414 | - fixed post_service errors |
---|
415 | - fixed provides to include perl modules |
---|
416 | - use file find instead of manually specifying files |
---|
417 | |
---|
418 | * Tue Jan 15 2002 Craig Hughes <craig@hughes-family.org> |
---|
419 | - Updated for 2.0 release |
---|
420 | |
---|
421 | * Wed Dec 05 2001 Craig Hughes <craig@hughes-family.org> |
---|
422 | - Updated for final 1.5 distribution. |
---|
423 | |
---|
424 | * Sun Nov 18 2001 Craig Hughes <craig@hughes-family.org> |
---|
425 | - first version of rpm. |
---|
426 | |
---|