123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496 |
- %define pdir Mail
- %define pnam SpamAssassin
- %define version 3.3.2
- %define real_version 3.3.2
- %global saversion 3.003002
- %define release 1%{_dist_release}
- %define cfdate 20140113
- %define name spamassassin
- %define _initrddir /etc/rc.d/init.d
- %define initdir %{_initrddir}
- #%define __find_provides /usr/lib/rpm/find-provides.perl
- #%define __find_requires /usr/lib/rpm/find-requires.perl
- Summary: a spam filter for email which can be invoked from mail delivery agents
- Summary(ja): MDA から起動できる spam email filter
- Group: Applications/Internet
- Name: %{name}
- Version: %{version}
- Release: %{release}
- License: Apache License 2.0
- URL: http://spamassassin.org/
- Source0: http://spamassassin.org/released/Mail-SpamAssassin-%{real_version}.tar.bz2
- Source1: http://spamassassin.org/released/Mail-SpamAssassin-rules-%{real_version}-r1104058.tar.gz
- Source2: sample-japanese-local.cf-%{cfdate}
- Source3: README.vine
- Source4: filter.sh
- Source5: spamassassin.sysconfig
- Source6: sa-update.logrotate
- Source7: sa-update.crontab
- Source8: sa-update.cronscript
- Source9: sa-update.force-sysconfig
- Source11: spamassassin-official.conf
- Source12: sought.conf
- Patch0: spamassassin-3.1.7_rules.patch
- Buildroot: %{_tmppath}/%{name}-%{version}-root
- Requires(pre): /sbin/chkconfig
- Requires(pre): perl-Mail-SpamAssassin = %{version}-%{release}
- Requires(pre): spamassassin-tools = %{version}-%{release}
- Requires: perl >= 1:5.10.0
- Requires: perl(Pod::Usage), perl(HTML::Parser) >= 3.43 perl(Digest::SHA1)
- Requires: perl(Net::DNS)
- # sa-update's Requires
- Requires: perl(Archive::Tar) >= 1.23 perl(IO::Zlib) >= 1.04 perl(LWP)
- BuildRequires: perl >= 1:5.10.0 perl(HTML::Parser) >= 3.43 perl(Digest::SHA1)
- BuildRequires: perl(Archive::Tar) >= 1.23 perl(IO::Zlib) >= 1.04
- BuildRequires: perl(Net::DNS)
- BuildRequires: perl(NetAddr::IP)
- Vendor: Project Vine
- Distribution: Vine Linux
- %description
- SpamAssassin provides you with a way to reduce if not completely eliminate
- Unsolicited Commercial Email (spam) from your incoming email. It can
- be invoked by a MDA such as sendmail or postfix, or can be called from
- a procmail script, .forward file, etc. It uses a genetic-algorithm
- evolved scoring system to identify messages which look spammy, then
- adds headers to the message so they can be filtered by the user's mail
- reading software. This distribution includes the spamd/spamc components
- which create a server that considerably speeds processing of mail.
- %description -l ja
- SpamAssassin は商用電子メール(スパム)を除去する手段を提供する filter です。
- sendmail または postfix のような MDA から SpamAssassin を起動することが
- 可能です。
- また procmail スクリプト、.forward ファイルなどからも呼ぶことができます。
- SpamAssassin は、スパムメッセージを識別するために遺伝的アルゴリズムを
- 発展させた、得点システムを使用しています。
- ユーザのメールソフト (MUA) がそれらをフィルタリングすることができるように、
- メッセージにヘッダーを加えます。
- また、メイルの処理速度を要求されるサーバーで用いる spamd/spamc コンポー
- ネントを含んでいます。
- 日本語のスパムメール用の local.cf を含めています。
- /usr/doc/spamassassin-*/sample-japanese-local.conf を見てください。
- %package tools
- Summary: Miscellaneous tools for SpamAssassin
- Summary(ja): SpamAssassin 向けの各種ツール
- Group: Applications/Internet
- Requires(pre): perl-Mail-SpamAssassin = %{version}-%{release}
- Requires: perl >= 1:5.6.1
- Autoreq: no
- %description tools
- Miscellaneous tools from various authors, distributed with SpamAssassin.
- See /usr/share/doc/SpamAssassin-tools-*/.
- %package -n perl-Mail-SpamAssassin
- Summary: %{pdir}::%{pnam} -- SpamAssassin e-mail filter Perl modules
- Requires: perl >= 1:5.6.1 perl(Pod::Usage) perl(HTML::Parser) >= 3.43
- Group: Development/Libraries
- %description -n perl-Mail-SpamAssassin
- Mail::SpamAssassin is a module to identify spam using text analysis and
- several internet-based realtime blacklists. Using its rule base, it uses a
- wide range of heuristic tests on mail headers and body text to identify
- ``spam'', also known as unsolicited commercial email. Once identified, the
- mail can then be optionally tagged as spam for later filtering using the
- user's own mail user-agent application.
- %prep -q
- %setup -q -n %{pdir}-%{pnam}-%{real_version}
- # %setup -D -a 1 -T -n %{pdir}-%{pnam}-%{real_version}
- %patch0 -p0 -b .rules
- # Japanese sample file / README
- cp -p %{SOURCE2} sample-japanese-local.cf
- cp -p %{SOURCE3} README.vine
- cp -p %{SOURCE4} filter.sh
- # sa-update sample
- cp -p %{SOURCE6} .
- cp -p %{SOURCE7} .
- cp -p %{SOURCE8} .
- # change README filename
- cp spamd/README spamd/README.spamd
- %build
- CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
- %{__perl} Makefile.PL INSTALLDIRS=vendor < /dev/null
- %{__make}
- %{__make} spamd/libspamc.so
- %install
- [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
- make DESTDIR=%{buildroot} install
- install -d %{buildroot}/%{initdir}
- install -m 0755 spamd/redhat-rc-script.sh %{buildroot}%{initdir}/spamassassin
- mkdir -p %{buildroot}%{_sysconfdir}/mail/spamassassin
- mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
- mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
- mkdir -p %{buildroot}%{_sysconfdir}/cron.d
- install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/spamassassin
- install -m 0644 %{SOURCE6} %{buildroot}/etc/logrotate.d/sa-update
- install -m 0644 %{SOURCE7} %{buildroot}/etc/cron.d/sa-update
- install -m 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/sa-update
- # installed mode 744 as non root users can't run it, but can read it.
- install -m 0744 %{SOURCE8} %{buildroot}%{_datadir}/spamassassin/sa-update.cron
- # [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
- find %{buildroot} \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
- find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
- # Default rules from separate tarball
- cd %{buildroot}%{_datadir}/spamassassin/
- tar xfvz %{SOURCE1}
- sed -i -e 's|\@\@VERSION\@\@|%{saversion}|' *.cf
- cd -
- find %{buildroot}/usr -type f -print |
- sed "s@^%{buildroot}@@g" |
- grep -v perllocal.pod |
- grep -v "\.packlist" > %{name}-%{version}-filelist
- if [ "$(cat %{name}-%{version}-filelist)X" = "X" ] ; then
- echo "ERROR: EMPTY FILE LIST"
- exit -1
- fi
- find %{buildroot}%{perl_vendorlib}/* -type d -print |
- sed "s@^%{buildroot}@%dir @g" >> %{name}-%{version}-filelist
- # sa-update channels and keyring directory
- mkdir -m 0700 %{buildroot}%{_sysconfdir}/mail/spamassassin/sa-update-keys/
- mkdir -m 0755 %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
- install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
- install -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/mail/spamassassin/channel.d/
- %clean
- [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
- %post
- # install
- if [ $1 = 1 ]; then
- /sbin/chkconfig --add spamassassin
- fi
- # update
- if [ $1 = 2 ]; then
- if [ -x /usr/bin/sa-learn ] ; then
- echo "Sync DB (sa-learn --sync)"
- /usr/bin/sa-learn --sync
- fi
- if [ -f /var/lock/subsys/spamassassin ]; then
- echo "restarting spamd"
- %{initdir}/spamassassin restart
- else
- echo 'If you use spamd,'
- echo ' "/etc/rc.d/init.d/spamassassin start"'
- echo 'to start the spamd daemon.'
- fi
- fi
- %post tools
- if [ -x /usr/bin/sa-update ] ; then
- echo "Update rules"
- /usr/bin/sa-update ||:
- fi
- %post -n perl-Mail-SpamAssassin
- if [ -x /usr/bin/sa-update ] ; then
- echo "Update rules"
- /usr/bin/sa-update ||:
- fi
- %pre -n perl-Mail-SpamAssassin
- # update
- if [ $1 = 2 ]; then
- if [ -x /usr/bin/sa-learn ] ; then
- echo "Sync DB (sa-learn --sync)"
- /usr/bin/sa-learn --sync ||:
- fi
- fi
- %preun
- # remove
- if [ $1 = 0 ]; then
- if [ -f /var/lock/subsys/spamassassin ]; then
- %{initdir}/spamassassin stop 1>&2
- fi
- /sbin/chkconfig --del spamassassin
- fi
- %files
- %defattr(-,root,root)
- %doc CREDITS Changes INSTALL INSTALL.VMS LICENSE MANIFEST MANIFEST.SKIP
- %doc NOTICE PACKAGING README README.vine TRADEMARK UPGRADE USAGE
- %doc sql
- %doc filter.sh
- %doc sample-nonspam.txt sample-spam.txt
- %doc spamd/README.spamd
- %doc sample-japanese-local.cf
- %doc sa-update.*
- %config(noreplace) %{_sysconfdir}/sysconfig/spamassassin
- %attr(755,root,root) %{_bindir}/spam*
- %config %attr(755,root,root) %{initdir}/spamassassin
- %{_mandir}/man1/spam*
- %files -n spamassassin-tools
- %defattr(644,root,root,755)
- %doc sql
- %config(noreplace) %{_sysconfdir}/sysconfig/sa-update
- %config(noreplace) %{_sysconfdir}/logrotate.d/sa-update
- %{_sysconfdir}/cron.d/sa-update
- %attr(755,root,root) %{_bindir}/sa-*
- %{_mandir}/man1/sa-*
- %files -n perl-Mail-SpamAssassin
- %defattr(-,root,root)
- %{perl_vendorlib}/Mail/*
- %{perl_vendorlib}/spamassassin-run.pod
- %config(noreplace) %{_sysconfdir}/mail/spamassassin
- %{_datadir}/spamassassin
- %{_mandir}/man3/*
- %changelog
- * Mon Jan 13 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.2-1
- - new upstream release.
- - added official rules.
- * Fri Apr 08 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.1-1
- - new upstream release.
- - replaced "Prereq:" and "BuildPrereq".
- - updated sample-japanese-local.cf.
- - added Patch1 and Patch2 for perl-5.12.x.
- * Mon Jun 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.5-1
- - new upstream release.
- - wrote spec in UTF-8.
- - updated sample-japanese-local.cf.
- * Thu May 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
- - 3.2.4-1
- - rebuilt with perl-5.10.0.
- * Sun Feb 24 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.2.4-0vl1
- - new upstream release (built for VineSeed)
- - update Requires/BuildRequires tag perl(HTML::Parser) >= 3.43
- - enable Requires for sa-update
- - remove "(noreplace)" from init script
- - remove Vine 3.x if-endif section
- - remove script for upgrading from sa 2.x
- - turn on daemon restart message
- - update sample-japanese-local.cf
- * Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 3.2.3-0vl1
- - new upstream release
- * Tue Feb 20 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.8-0vl2
- - rebuilt for VinePlus 4.x
- - installed perl modules to vendor_perl dir
- * Sun Feb 18 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.8-0vl1
- - built for VinePlus 3.x
- - installed perl modules to site_perl dir
- - add restart spamd process automactically (update)
- - * Thu Dec 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.7-0vl1.1
- - fix file list
- - sample-japanese-local.cf update
- - README.vine update
- * Sun Feb 18 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.8-0vl0.1
- - test package (not released)
- - built for VinePlus 4.0
- - new upstream release with security fix (CVE-2007-0451)
- - add Source4,5,6 for sa-update sample file
- * Tue Nov 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.7-0vl3
- - fix file list
- - sample-japanese-local.cf update
- - README.vine update
- - fix changelog missing
- * Mon Oct 16 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.7-0vl2
- - built for VinePlus 4.0
- - This package is based on VinePlus 3.x package
- - installed perl modules to vendor_perl dir
- - * Tue Jul 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.64-0vl3
- - rebuilt with perl 5.8.6
- - changed Group to Applications/Internet
- - installed perl modules to vendor_perl dir
- * Sat Oct 14 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.7-0vl1
- - new upstream release
- - add %pre -n perl-Mail-SpamAssassin script for updating package
- - add README.vine filter.sh
- - change License to Apache License 2.0
- * Sat Oct 07 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 3.1.5-0vl1
- - new upstream release
- - built for VinePlus 3.2
- * Sat Nov 27 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.64-0vl2
- - rebuild for VinePlus 3.0
- * Sat Nov 27 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.64-0vl1
- - rebuild for VinePlus 2.5/2.6
- - Source version up
- - Sample-japanese-local.cf update
- * Sat Apr 10 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.63-0vl4
- - rebuild for VineSeed Plus
- - Sample-japanese-local.cf update
- * Mon Apr 05 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.63-0vl3
- - Source version up
- - Sample-japanese-local.cf update
- * Sun Apr 04 2004 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.63-0vl2
- - Source version up
- - Sample-japanese-local.cf update
- * Tue Dec 23 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.61-0vl1
- - Source version up
- - Sample-japanese-local.cf update
- - Change make & install method for 2.61
- - fix Require
- - add post/preun script for update from 2.5x
- - add Vendor/Distribution tag
- * Sat May 24 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.55-0vl2
- - Sample-japanese-local.cf update
- * Sat May 24 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.55-0vl1
- - Source version up
- * Fri Apr 25 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.53-0vl1
- - Source version up
- - Sample-japanese-local.cf update
- * Fri Mar 28 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.52-0vl1
- - Source version up
- * Thu Feb 06 2003 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.44-0vl1
- - Source version up
- - Sample-japanese-local.cf update
- - Fix japanese discription
- * Wed Oct 23 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.43-0vl2
- - Update & fix sample-japanese-local.cf
- * Fri Oct 18 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.43-0vl1
- - Source version up
- - Change make & install method for 2.43
- - Update sample-japanese-local.cf
- - Thanx to MATSUDA Yoh-ichi <matsuda@palnet.or.jp> san
- - Change Buildprereq, Requires (perl 5.6.0 -> 5.6.1) for Vine 2.5
- - Add doc qmail
- - Fix cvs version tags (Patch0)
- * Thu Oct 10 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.42-3vl3
- - stop install sample-japanese-local.cf to /etc/mail/spamassassin
- - add japanese discription
- - Fix Buildrequires
- * Tue Oct 08 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.42-3vl2
- - Fix Requires, Buildrequires
- - add local.cf for Japanese (from Linux-Users ML spam filter)
- * Mon Oct 07 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- - 2.42-3vl1
- - first build for Vine Linux
- - NO run post/preun script
- - add requires perl(Time::HiRes)
- - add define _initrcdir
- * Sat Oct 05 2002 Theo Van Dinter <felicity@kluge.net> -3
- - fixed some small typos in the spec file
- * Fri Oct 04 2002 Theo Van Dinter <felicity@kluge.net> -2
- - small bug where 2.42 still called itself 2.42-cvs
- * Fri Oct 04 2002 Theo Van Dinter <felicity@kluge.net> -1
- - updated to SA 2.42
- * Wed Sep 11 2002 Justin Mason <jm-spec@jmason.org>
- - spamassassin RPM now requires perl-Mail-SpamAssassin; from Theo
- * Tue Sep 03 2002 Theo Van Dinter <felicity@kluge.net>
- - added INSTALL to documentation files
- - install man pages via _manpage macro to make things consistent
- - added perl requires statement
- - cleaned out some cruft
- - fixed "file listed twice" bug
- * Wed Aug 28 2002 Justin Mason <jm-spec@jmason.org>
- - merged code from PLD rpm, split into spamassassin, perl-Mail-SpamAssassin,
- and spamassassin-tools rpms
- * Mon Jul 29 2002 Justin Mason <jm-spec@jmason.org>
- - removed migrate_cfs code, obsolete
- * Thu Jul 25 2002 Justin Mason <jm-spec@jmason.org>
- - removed findbin patch, obsolete
- * Fri Apr 19 2002 Theo Van Dinter <felicity@kluge.net>
- - Updated for 2.20 release
- - made /etc/mail/spamassassin a config directory so local.cf doesn't get wiped out
- - added a patch to remove findbin stuff
- * Wed Feb 27 2002 Craig Hughes <craig@hughes-family.org>
- - Updated for 2.1 release
- * Sat Feb 02 2002 Theo Van Dinter <felicity@kluge.net>
- - Updates for 2.01 release
- - Fixed rc file
- - RPM now buildable as non-root
- - fixed post_service errors
- - fixed provides to include perl modules
- - use file find instead of manually specifying files
- * Tue Jan 15 2002 Craig Hughes <craig@hughes-family.org>
- - Updated for 2.0 release
- * Wed Dec 05 2001 Craig Hughes <craig@hughes-family.org>
- - Updated for final 1.5 distribution.
- * Sun Nov 18 2001 Craig Hughes <craig@hughes-family.org>
- - first version of rpm.
|