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

Revision 12320, 16.6 KB checked in by tomop, 4 years ago (diff)

updated 18 packages

clamav-0.102.2-1

dhcpcd-8.1.1-1

dovecot-2.3.9.3-1

golang-1.13.5-1

llvm-9.0.1-1

libjpeg-turbo-2.0.4-1

libserf-1.3.9-2

libxml2-2.9.10-2

mariadb-10.4.12-1

nodejs-12.16.0-1

php-ext-clearsilver-0.4-15

php73-7.3.14-1

python-pillow-6.2.2-1

rust-1.40.0-1

spamassassin-3.4.4-1

sqlite3-3.31.1-1

squid-4.10-1

sudo-1.8.31-1

Line 
1
2%define pdir    Mail
3%define pnam    SpamAssassin
4
5%define version 3.4.4
6%define real_version 3.4.4
7%global saversion 3.004004
8%define release 1%{?_dist_release}
9%define cfdate 20151119
10%define rules_release r1873061
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* Sat Feb 01 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.4-1
287- new upstream release.
288
289* Fri Dec 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.3-1
290- new upstream release.
291
292* Sun May 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.2-1
293- new upstream release.
294- rebuilt with perl-5.26.
295
296* Sat Nov 28 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.1-1
297- new upstream release.
298- removed %%patch1000 (no longer needed).
299
300* Wed Dec 17 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.0-2
301- added Patch1000.
302
303* Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.4.0-1
304- new upstream release.
305
306* Mon Jan 13 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.2-1
307- new upstream release.
308- added official rules.
309
310* Fri Apr 08 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.1-1
311- new upstream release.
312- replaced "Prereq:" and "BuildPrereq".
313- updated sample-japanese-local.cf.
314- added Patch1 and Patch2 for perl-5.12.x.
315
316* Mon Jun 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.5-1
317- new upstream release.
318- wrote spec in UTF-8.
319- updated sample-japanese-local.cf.
320
321* Thu May  1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
322- 3.2.4-1
323- rebuilt with perl-5.10.0.
324
325* Sun Feb 24 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
326- 3.2.4-0vl1
327- new upstream release (built for VineSeed)
328- update Requires/BuildRequires tag perl(HTML::Parser) >= 3.43
329- enable Requires for sa-update
330- remove "(noreplace)" from init script
331- remove Vine 3.x if-endif section
332- remove script for upgrading from sa 2.x
333- turn on daemon restart message
334- update sample-japanese-local.cf
335
336* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 3.2.3-0vl1
337- new upstream release
338
339* Tue Feb 20 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
340- 3.1.8-0vl2
341- rebuilt for VinePlus 4.x
342- installed perl modules to vendor_perl dir
343
344* Sun Feb 18 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
345- 3.1.8-0vl1
346- built for VinePlus 3.x
347- installed perl modules to site_perl dir
348- add restart spamd process automactically (update)
349
350  - * Thu Dec 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
351  - 3.1.7-0vl1.1
352  - fix file list
353  - sample-japanese-local.cf update
354  - README.vine update
355
356* Sun Feb 18 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
357- 3.1.8-0vl0.1
358- test package (not released)
359- built for VinePlus 4.0
360- new upstream release with security fix (CVE-2007-0451)
361- add Source4,5,6 for sa-update sample file
362
363* Tue Nov 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
364- 3.1.7-0vl3
365- fix file list
366- sample-japanese-local.cf update
367- README.vine update
368- fix changelog missing
369
370* Mon Oct 16 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
371- 3.1.7-0vl2
372- built for VinePlus 4.0
373- This package is based on VinePlus 3.x package
374- installed perl modules to vendor_perl dir
375
376  - * Tue Jul 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.64-0vl3
377  - rebuilt with perl 5.8.6
378  - changed Group to Applications/Internet
379  - installed perl modules to vendor_perl dir
380
381* Sat Oct 14 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
382- 3.1.7-0vl1
383- new upstream release
384- add %pre -n perl-Mail-SpamAssassin script for updating package
385- add README.vine filter.sh
386- change License to Apache License 2.0
387
388* Sat Oct 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
389- 3.1.5-0vl1
390- new upstream release
391- built for VinePlus 3.2
392
393* Sat Nov 27 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
394- 2.64-0vl2
395- rebuild for VinePlus 3.0
396
397* Sat Nov 27 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
398- 2.64-0vl1
399- rebuild for VinePlus 2.5/2.6
400- Source version up
401- Sample-japanese-local.cf update
402
403* Sat Apr 10 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
404- 2.63-0vl4
405- rebuild for VineSeed Plus
406- Sample-japanese-local.cf update
407
408* Mon Apr 05 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
409- 2.63-0vl3
410- Source version up
411- Sample-japanese-local.cf update
412
413* Sun Apr 04 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
414- 2.63-0vl2
415- Source version up
416- Sample-japanese-local.cf update
417
418* Tue Dec 23 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
419- 2.61-0vl1
420- Source version up
421- Sample-japanese-local.cf update
422- Change make & install method for 2.61
423- fix Require
424- add post/preun script for update from 2.5x
425- add Vendor/Distribution tag
426
427* Sat May 24 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
428- 2.55-0vl2
429- Sample-japanese-local.cf update
430
431* Sat May 24 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
432- 2.55-0vl1
433- Source version up
434
435* Fri Apr 25 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
436- 2.53-0vl1
437- Source version up
438- Sample-japanese-local.cf update
439
440* Fri Mar 28 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
441- 2.52-0vl1
442- Source version up
443
444* Thu Feb 06 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
445- 2.44-0vl1
446- Source version up
447- Sample-japanese-local.cf update
448- Fix japanese discription
449
450* Wed Oct 23 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
451- 2.43-0vl2
452- Update & fix sample-japanese-local.cf
453
454* Fri Oct 18 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
455- 2.43-0vl1
456- Source version up
457- Change make & install method for 2.43
458- Update sample-japanese-local.cf
459    - Thanx to MATSUDA Yoh-ichi <matsuda@palnet.or.jp> san
460- Change Buildprereq, Requires (perl 5.6.0 -> 5.6.1) for Vine 2.5
461- Add doc qmail
462- Fix cvs version tags (Patch0)
463
464* Thu Oct 10 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
465- 2.42-3vl3
466- stop install sample-japanese-local.cf to /etc/mail/spamassassin
467- add japanese discription
468- Fix Buildrequires
469
470* Tue Oct 08 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
471- 2.42-3vl2
472- Fix Requires, Buildrequires
473- add local.cf for Japanese (from Linux-Users ML spam filter)
474
475* Mon Oct 07 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
476- 2.42-3vl1
477- first build for Vine Linux
478- NO run post/preun script
479- add requires perl(Time::HiRes)
480- add define _initrcdir
481
482* Sat Oct 05 2002 Theo Van Dinter <felicity@kluge.net> -3
483- fixed some small typos in the spec file
484
485* Fri Oct 04 2002 Theo Van Dinter <felicity@kluge.net> -2
486- small bug where 2.42 still called itself 2.42-cvs
487
488* Fri Oct 04 2002 Theo Van Dinter <felicity@kluge.net> -1
489- updated to SA 2.42
490
491* Wed Sep 11 2002 Justin Mason <jm-spec@jmason.org>
492- spamassassin RPM now requires perl-Mail-SpamAssassin; from Theo
493
494* Tue Sep 03 2002 Theo Van Dinter <felicity@kluge.net>
495- added INSTALL to documentation files
496- install man pages via _manpage macro to make things consistent
497- added perl requires statement
498- cleaned out some cruft
499- fixed "file listed twice" bug
500
501* Wed Aug 28 2002 Justin Mason <jm-spec@jmason.org>
502- merged code from PLD rpm, split into spamassassin, perl-Mail-SpamAssassin,
503  and spamassassin-tools rpms
504
505* Mon Jul 29 2002 Justin Mason <jm-spec@jmason.org>
506- removed migrate_cfs code, obsolete
507
508* Thu Jul 25 2002 Justin Mason <jm-spec@jmason.org>
509- removed findbin patch, obsolete
510
511* Fri Apr 19 2002 Theo Van Dinter <felicity@kluge.net>
512- Updated for 2.20 release
513- made /etc/mail/spamassassin a config directory so local.cf doesn't get wiped out
514- added a patch to remove findbin stuff
515
516* Wed Feb 27 2002 Craig Hughes <craig@hughes-family.org>
517- Updated for 2.1 release
518
519* Sat Feb 02 2002 Theo Van Dinter <felicity@kluge.net>
520- Updates for 2.01 release
521- Fixed rc file
522- RPM now buildable as non-root
523- fixed post_service errors
524- fixed provides to include perl modules
525- use file find instead of manually specifying files
526
527* Tue Jan 15 2002 Craig Hughes <craig@hughes-family.org>
528- Updated for 2.0 release
529
530* Wed Dec 05 2001 Craig Hughes <craig@hughes-family.org>
531- Updated for final 1.5 distribution.
532
533* Sun Nov 18 2001 Craig Hughes <craig@hughes-family.org>
534- first version of rpm.
535
Note: See TracBrowser for help on using the repository browser.