spamassassin-vl.spec 13 KB

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