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

Revision 9838, 16.2 KB checked in by tomop, 8 years ago (diff)

spamassassin-3.4.1-1

Line 
1
2%define pdir    Mail
3%define pnam    SpamAssassin
4
5%define version 3.4.1
6%define real_version 3.4.1
7%global saversion 3.004001
8%define release 1%{?_dist_release}
9%define cfdate 20151119
10%define rules_release r1675274
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
39Buildroot: %{_tmppath}/%{name}-%{version}-root
40Requires(pre): /sbin/chkconfig
41Requires(pre): perl-Mail-SpamAssassin = %{version}-%{release}
42Requires(pre): spamassassin-tools = %{version}-%{release}
43
44Requires: perl >= 1:5.16.0
45
46BuildRequires: perl >= 1:5.10.0
47BuildRequires: perl(HTML::Parser) >= 3.43
48BuildRequires: perl(Archive::Tar) >= 1.23
49BuildRequires: perl(IO::Zlib) >= 1.04
50BuildRequires: perl(Net::DNS)
51BuildRequires: perl(NetAddr::IP)
52BuildRequires: perl(Mail::DKIM)
53BuildRequires: perl(Geo::IP)
54BuildRequires: perl(Digest::SHA1)
55BuildRequires: perl(Encode::Detect)
56BuildRequires: curl
57
58Vendor: Project Vine
59Distribution: Vine Linux
60
61%description
62SpamAssassin provides you with a way to reduce if not completely eliminate
63Unsolicited Commercial Email (spam) from your incoming email.  It can
64be invoked by a MDA such as sendmail or postfix, or can be called from
65a procmail script, .forward file, etc.  It uses a genetic-algorithm
66evolved scoring system to identify messages which look spammy, then
67adds headers to the message so they can be filtered by the user's mail
68reading software.  This distribution includes the spamd/spamc components
69which create a server that considerably speeds processing of mail.
70
71%description -l ja
72SpamAssassin は商用電子メール(スパム)を除去する手段を提供する filter です。
73
74sendmail または postfix のような MDA から SpamAssassin を起動することが
75可能です。
76また procmail スクリプト、.forward ファイルなどからも呼ぶことができます。
77
78SpamAssassin は、スパムメッセージを識別するために遺伝的アルゴリズムを
79発展させた、得点システムを使用しています。
80ユーザのメールソフト (MUA) がそれらをフィルタリングすることができるように、
81メッセージにヘッダーを加えます。
82また、メイルの処理速度を要求されるサーバーで用いる spamd/spamc コンポー
83ネントを含んでいます。
84
85日本語のスパムメール用の local.cf を含めています。
86/usr/doc/spamassassin-*/sample-japanese-local.conf を見てください。
87
88%package tools
89Summary: Miscellaneous tools for SpamAssassin
90Summary(ja): SpamAssassin 向けの各種ツール
91Group: Applications/Internet
92Requires(pre): perl-Mail-SpamAssassin = %{version}-%{release}
93Requires: perl >= 1:5.6.1
94Requires: curl
95
96%description tools
97Miscellaneous tools from various authors, distributed with SpamAssassin.
98See /usr/share/doc/SpamAssassin-tools-*/.
99
100%package -n perl-Mail-SpamAssassin
101Summary: %{pdir}::%{pnam} -- SpamAssassin e-mail filter Perl modules
102Group: Development/Libraries
103Requires: perl >= 1:5.6.1
104Requires: perl(Pod::Usage) perl(HTML::Parser) >= 3.43
105Requires: perl(Archive::Tar) >= 1.23
106Requires: perl(IO::Zlib) >= 1.04
107Requires: perl(Net::DNS)
108Requires: perl(NetAddr::IP)
109Requires: perl(Mail::DKIM)
110Requires: perl(Geo::IP)
111Requires: perl(Digest::SHA1)
112Requires: perl(Encode::Detect)
113
114%description -n perl-Mail-SpamAssassin
115Mail::SpamAssassin is a module to identify spam using text analysis and
116several internet-based realtime blacklists. Using its rule base, it uses a
117wide range of heuristic tests on mail headers and body text to identify
118``spam'', also known as unsolicited commercial email. Once identified, the
119mail can then be optionally tagged as spam for later filtering using the
120user's own mail user-agent application.
121
122%prep -q
123%setup -q -n %{pdir}-%{pnam}-%{real_version}
124# %setup -D -a 1 -T -n %{pdir}-%{pnam}-%{real_version}
125
126%patch0 -p0 -b .rules
127
128# Japanese sample file / README
129cp -p %{SOURCE2} sample-japanese-local.cf
130cp -p %{SOURCE3} README.vine
131cp -p %{SOURCE4} filter.sh
132# sa-update sample
133cp -p %{SOURCE6} .
134cp -p %{SOURCE7} .
135cp -p %{SOURCE8} .
136# change README filename
137cp spamd/README spamd/README.spamd
138
139%build
140CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
141%{__perl} Makefile.PL INSTALLDIRS=vendor < /dev/null
142
143%{__make}
144%{__make} spamd/libspamc.so
145
146%install
147[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
148
149make DESTDIR=%{buildroot} install
150
151install -d %{buildroot}/%{initdir}
152install -m 0755 spamd/redhat-rc-script.sh %{buildroot}%{initdir}/spamassassin
153mkdir -p %{buildroot}%{_sysconfdir}/mail/spamassassin
154
155mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
156mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
157mkdir -p %{buildroot}%{_sysconfdir}/cron.d
158install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/spamassassin
159install -m 0644 %{SOURCE6} %{buildroot}/etc/logrotate.d/sa-update
160install -m 0644 %{SOURCE7} %{buildroot}/etc/cron.d/sa-update
161install -m 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/sa-update
162# installed mode 744 as non root users can't run it, but can read it.
163install -m 0744 %{SOURCE8} %{buildroot}%{_datadir}/spamassassin/sa-update.cron
164
165# [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
166
167find %{buildroot} \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
168find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
169
170# Default rules from separate tarball
171cd %{buildroot}%{_datadir}/spamassassin/
172tar xfvz %{SOURCE1}
173sed -i -e 's|\@\@VERSION\@\@|%{saversion}|' *.cf
174cd -
175
176find %{buildroot}/usr -type f -print |
177        sed "s@^%{buildroot}@@g" |
178        grep -v perllocal.pod |
179        grep -v "\.packlist" > %{name}-%{version}-filelist
180if [ "$(cat %{name}-%{version}-filelist)X" = "X" ] ; then
181    echo "ERROR: EMPTY FILE LIST"
182    exit -1
183fi
184find %{buildroot}%{perl_vendorlib}/* -type d -print |
185        sed "s@^%{buildroot}@%dir @g" >> %{name}-%{version}-filelist
186
187# sa-update channels and keyring directory
188mkdir   -m 0700             %{buildroot}%{_sysconfdir}/mail/spamassassin/sa-update-keys/
189mkdir   -m 0755             %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
190install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
191install -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
192
193%clean
194[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
195
196%post
197# install
198if [ $1 = 1 ]; then
199         /sbin/chkconfig --add spamassassin
200fi
201
202# update
203if [ $1 = 2 ]; then
204    if [ -x /usr/bin/sa-learn ] ; then
205        echo "Sync DB (sa-learn --sync)"
206        /usr/bin/sa-learn --sync
207    fi
208    if [ -f /var/lock/subsys/spamassassin ]; then
209        echo "restarting spamd"
210        %{initdir}/spamassassin restart
211    else
212        echo 'If you use spamd,'
213        echo '  "/etc/rc.d/init.d/spamassassin start"'
214        echo 'to start the spamd daemon.'
215    fi
216fi
217
218%post tools
219
220if [ -x /usr/bin/sa-update ] ; then
221echo "Update rules"
222/usr/bin/sa-update ||:
223fi
224
225%post -n perl-Mail-SpamAssassin
226if [ -x /usr/bin/sa-update ] ; then
227echo "Update rules"
228/usr/bin/sa-update ||:
229fi
230
231%pre -n perl-Mail-SpamAssassin
232# update
233if [ $1 = 2 ]; then
234    if [ -x /usr/bin/sa-learn ] ; then
235        echo "Sync DB (sa-learn --sync)"
236        /usr/bin/sa-learn --sync ||:
237    fi
238fi
239
240%preun
241# remove
242if [ $1 = 0 ]; then
243        if [ -f /var/lock/subsys/spamassassin ]; then
244                %{initdir}/spamassassin stop 1>&2
245        fi
246        /sbin/chkconfig --del spamassassin
247fi
248
249%files
250%defattr(-,root,root)
251%doc CREDITS Changes INSTALL INSTALL.VMS LICENSE MANIFEST MANIFEST.SKIP
252%doc NOTICE PACKAGING README README.vine TRADEMARK UPGRADE USAGE
253%doc sql
254%doc filter.sh
255%doc sample-nonspam.txt sample-spam.txt
256%doc spamd/README.spamd
257%doc sample-japanese-local.cf
258%doc sa-update.*
259%config(noreplace) %{_sysconfdir}/sysconfig/spamassassin
260%attr(755,root,root) %{_bindir}/spam*
261%config %attr(755,root,root) %{initdir}/spamassassin
262%{_mandir}/man1/spam*
263
264%files -n spamassassin-tools
265%defattr(644,root,root,755)
266%doc sql
267%config(noreplace) %{_sysconfdir}/sysconfig/sa-update
268%config(noreplace) %{_sysconfdir}/logrotate.d/sa-update
269%{_sysconfdir}/cron.d/sa-update
270%attr(755,root,root) %{_bindir}/sa-*
271%{_mandir}/man1/sa-*
272
273%files -n perl-Mail-SpamAssassin
274%defattr(-,root,root)
275%{perl_vendorlib}/Mail/*
276%{perl_vendorlib}/spamassassin-run.pod
277
278%config(noreplace) %{_sysconfdir}/mail/spamassassin
279%{_datadir}/spamassassin
280%{_mandir}/man3/*
281
282%changelog
283* Sat Nov 28 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.1-1
284- new upstream release.
285- removed %%patch1000 (no longer needed).
286
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.