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

Revision 8162, 15.7 KB checked in by tomop, 10 years ago (diff)

updated many packages.

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