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

Revision 12317, 16.5 KB checked in by tomop, 4 years ago (diff)

updated 7 packages

dovecot-2.3.9.2-1

mariadb-10.4.11-1

openssl-1.1.1d-2

php73-7.3.13-1

spamassassin-3.4.3-1

squid-4.9-1

zabbix-4.0.15-1

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