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

Revision 12120, 16.4 KB checked in by tomop, 5 years ago (diff)

perl-5.26 and friends

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