source: projects/specs/trunk/s/spamassassin/spamassassin-vl.spec @ 9161

Revision 9161, 16.2 KB checked in by tomop, 9 years ago (diff)

spamassassin-3.4.0-2

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