clamav-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. %define dbdir %{_localstatedir}/lib/clamav
  2. %if %{?_dist_release}!="vl5"
  3. %define milter 1
  4. %else
  5. %define milter 0
  6. %endif
  7. Summary: Clam AntiVirus
  8. Summary(ja): Clamアンチウィルススキャナ
  9. Name: clamav
  10. Version: 0.97
  11. Release: 2%{?_dist_release}
  12. License: GPL
  13. Group: Applications/System
  14. URL: http://www.clamav.net/
  15. Source0: http://clamav.elektrapro.com/stable/%{name}-%{version}.tar.gz
  16. Source1: clamd.init
  17. Source2: freshclam.init
  18. Source3: clamav-milter.init
  19. Source4: clamav.logrotate
  20. Source5: clamav-milter.logrotate
  21. Source100: README.clamd-vine
  22. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  23. BuildRequires: bzip2-devel, curl-devel > 7.10.0, gmp-devel, ncurses-devel
  24. BuildRequires: openssl-devel, zlib-devel
  25. %if %{?milter}
  26. BuildRequires: sendmail-devel
  27. %endif
  28. Requires: bzip2, curl > 7.10.0, gmp, ncurses, openssl, zlib, logrotate
  29. Requires(pre): shadow-utils, grep
  30. Vendor: Project Vine
  31. Distribution: Vine Linux
  32. Packager: tomop, inagaki
  33. %description
  34. Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
  35. AMaViS, compressed files, uses the virus database from
  36. OpenAntivirus.org, and includes a program for auto-updating. The scanner
  37. is multithreaded, written in C, and POSIX compliant.
  38. %description -l ja
  39. Clamアンチウィルスは強力なUNIX向けのアンチウィルススキャナです。
  40. AMaViS、圧縮ファイルをサポートし、OpenAntivirus.orgのウィルスデータ
  41. ベースを利用しています。またウィルスデータベースの自動アップデート
  42. プログラムを含んでいます。 このCで書かれたスキャナはマルチスレッド化
  43. されており、 POSIXに準拠しています。
  44. %if %{?milter}
  45. %package milter
  46. Summary: Virus scanner for sendmail/postfix
  47. Group: Applications/System
  48. %description milter
  49. clamav-milter is a milter module to scan mails using Clam AntiVirus.
  50. %endif
  51. %package devel
  52. Group: Development/Libraries
  53. Summary: headers and libraries for development using Clam AntiVirus
  54. Summary(ja): Clam AntiVirus を用いた開発に必要なヘッダ・ライブラリ
  55. Requires: %{name} = %{version}-%{release}
  56. Requires: zlib-devel bzip2-devel gmp-devel
  57. %description devel
  58. clamav-devel provides headers and libraries for development using
  59. Clam AntiVirus.
  60. %description -l ja devel
  61.  clamav-devel パッケージは、Clam AntiVirus を用いた開発を行うための
  62. ヘッダファイルやライブラリファイルを提供します。
  63. %prep
  64. %setup -q
  65. cp %{SOURCE100} .
  66. perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/clamd.pid|' etc/clamd.conf
  67. perl -pi -e 's|^#LogFile .+$|LogFile /var/log/clamav/clamd.log|' etc/clamd.conf
  68. perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/freshclam.pid|' etc/freshclam.conf
  69. perl -pi -e 's|^#UpdateLogFile .+$|UpdateLogFile /var/log/clamav/freshclam.log|' etc/freshclam.conf
  70. perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/clamav-milter.pid|' etc/clamav-milter.conf
  71. perl -pi -e 's|^#LogFile .+$|LogFile /var/log/clamav/clamav-milter.log|' etc/clamav-milter.conf
  72. %build
  73. %if %{?milter}
  74. %configure --disable-clamav --enable-milter --with-dbdir=%{dbdir}
  75. %else
  76. %configure --disable-clamav --with-dbdir=%{dbdir}
  77. %endif
  78. make %{?_smp_mflags}
  79. %install
  80. rm -rf %{buildroot}
  81. mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
  82. mkdir -p %{buildroot}%{_initdir}
  83. mkdir -p %{buildroot}%{_localstatedir}/run/clamav
  84. mkdir -p %{buildroot}%{_localstatedir}/log/clamav
  85. make install DESTDIR=%{buildroot} transform='s,x,x,'
  86. install -m755 %{SOURCE1} %{buildroot}%{_initdir}/clamd
  87. install -m755 %{SOURCE2} %{buildroot}%{_initdir}/freshclam
  88. %if %{?milter}
  89. install -m755 %{SOURCE3} %{buildroot}%{_initdir}/clamav-milter
  90. install -m644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/clamav-milter
  91. %endif
  92. install -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
  93. install etc/clamd.conf %{buildroot}%{_sysconfdir}
  94. install etc/freshclam.conf %{buildroot}%{_sysconfdir}
  95. rm -f %{buildroot}%{_libdir}/lib*a
  96. %clean
  97. rm -rf %{buildroot}
  98. %pre
  99. if ! grep -q '^clamav:' /etc/group; then
  100. /usr/sbin/groupadd -r clamav
  101. fi
  102. if ! grep -q '^clamav:' /etc/passwd; then
  103. /usr/sbin/useradd -M -r -s /bin/false -g clamav -c "Clam Antivirus" clamav || :
  104. fi
  105. %post
  106. /sbin/ldconfig
  107. /sbin/chkconfig --add clamd
  108. /sbin/chkconfig --add freshclam
  109. %preun
  110. if [ "$1" = 0 ]; then
  111. [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamd stop
  112. [ ! -f /var/run/clamav/freshclam.pid ] || /etc/init.d/freshclam stop
  113. /sbin/chkconfig --del clamd
  114. /sbin/chkconfig --del freshclam
  115. fi
  116. %postun
  117. /sbin/ldconfig
  118. if [ "$1" = 0 ]; then
  119. if [ `grep clamav /etc/passwd | wc -l` = 1 ]; then
  120. /usr/sbin/userdel clamav
  121. fi
  122. if [ `grep clamav /etc/group | wc -l` = 1 ]; then
  123. /usr/sbin/groupdel clamav
  124. fi
  125. else
  126. [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamd restart
  127. [ ! -f /var/run/clamav/freshclam.pid ] || /etc/init.d/freshclam restart
  128. fi
  129. %if %{?milter}
  130. %post milter
  131. /sbin/chkconfig --add clamav-milter
  132. %preun milter
  133. if [ "$1" = 0 ]; then
  134. [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamav-milter stop
  135. /sbin/chkconfig --del clamav-milter
  136. fi
  137. %postun milter
  138. if [ "$1" -ge 1 ]; then
  139. [ ! -f /var/run/clamav/clamav-milter.pid ] || /etc/init.d/clamav-milter restart
  140. fi
  141. %endif
  142. %files
  143. %defattr(-,root,root)
  144. %doc AUTHORS BUGS COPYING* ChangeLog FAQ INSTALL NEWS README examples test
  145. %doc README
  146. %doc docs/*
  147. %{_initdir}/clamd
  148. %{_initdir}/freshclam
  149. %config(noreplace) %{_sysconfdir}/clamd.conf
  150. %config(noreplace) %{_sysconfdir}/freshclam.conf
  151. %config(noreplace) %{_sysconfdir}/logrotate.d/clamav
  152. %{_bindir}/*
  153. %exclude %{_bindir}/clamav-config
  154. %{_sbindir}/*
  155. %{_libdir}/lib*.so.*
  156. %attr(-,clamav,clamav) %dir %{_localstatedir}/run/clamav
  157. %attr(-,clamav,clamav) %dir %{_localstatedir}/log/clamav
  158. %attr(-,clamav,clamav) %dir %{dbdir}
  159. %attr(-,clamav,clamav) %config(noreplace) %{dbdir}/*
  160. %exclude %{_mandir}/man8/clamav-milter.8*
  161. %{_mandir}/man*/*
  162. %if %{?milter}
  163. %files milter
  164. %defattr(-,root,root)
  165. %doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README
  166. %{_initdir}/clamav-milter
  167. %config(noreplace) %{_sysconfdir}/clamav-milter.conf
  168. %config(noreplace) %{_sysconfdir}/logrotate.d/clamav-milter
  169. %{_sbindir}/clamav-milter
  170. %{_mandir}/man8/clamav-milter.8*
  171. %endif
  172. %files devel
  173. %defattr(-,root,root)
  174. %doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README
  175. %{_bindir}/clamav-config
  176. %{_libdir}/lib*.so
  177. %{_libdir}/pkgconfig/*.pc
  178. %{_includedir}/*
  179. %changelog
  180. * Sun Mar 27 2011 IWAI, Masaharu <iwai@alib.jp> 0.97-2
  181. - add else routine for milter: fix building on Vine Linux 5
  182. * Tue Feb 08 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97-1
  183. - new upstream release.
  184. * Fri Dec 03 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.5-1
  185. - new upstream release.
  186. * Sat Nov 27 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-3
  187. - moved virus databases to /var/lib/clamav.
  188. * Wed Nov 17 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-2
  189. - added milter support.
  190. * Fri Nov 05 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-1
  191. - new upstream release.
  192. - added logrotate support.
  193. - fixed pre/post scripts for daemons.
  194. * Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 0.96-2
  195. - rebuilt with rpm-4.8.1 for pkg-config
  196. * Sun Apr 11 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.96-1
  197. - new upstream release.
  198. * Sat Jan 30 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.95.3-1
  199. - new upstream release.
  200. * Thu Jun 11 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95.2-1
  201. - new upstream release.
  202. * Tue Jun 2 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95.1-1
  203. - new upstream release.
  204. * Tue Mar 24 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95-2
  205. - dropped *.a files.
  206. * Tue Mar 24 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95-1
  207. - new upstream release.
  208. * Tue Jun 10 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.93.1-1
  209. - new upstream release.
  210. - wrote specfile in UTF-8.
  211. * Tue Apr 15 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.93-1
  212. - new upstream release.
  213. - move clamd.init to /etc/rc.d/init.d/.
  214. - add /etc/rc.d/init.d/freshclam.
  215. * Thu Apr 10 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-1
  216. - apply new versioning policy.
  217. * Sat Mar 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-0vl0.40.1
  218. - add missing files.
  219. * Sat Mar 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-0vl0.40
  220. - new upstream release.
  221. * Tue Aug 21 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.91.2-0vl0.40
  222. - new upstream release.
  223. * Thu Aug 9 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.91.1-0vl0.40
  224. - new upstream release.
  225. * Fri Mar 2 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.90.1-0vl0.40
  226. - new upstream release.
  227. * Mon Feb 26 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.90-0vl0.40
  228. - new upstream release.
  229. * Thu Feb 1 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.7-0vl0.40
  230. - for Vine Linux 4.0.
  231. - new upstream release.
  232. * Tue Nov 7 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.6-0vl1
  233. - built for VineSeed.
  234. * Mon Nov 6 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.6-0vl0.1
  235. - new upstream release.
  236. * Thu Oct 19 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.5-0vl0.1
  237. - new upstream release.
  238. * Wed Aug 16 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.4-0vl0.1
  239. - rebuilt for Vine Linux 3.x.
  240. * Wed Aug 16 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.4-0vl1
  241. - new upstream release.
  242. * Sat Aug 5 2006 IWAI, Masaharu <iwai@alib.jp> 0.88.2-0vl3
  243. - add clamd.init script in doc dir
  244. * Mon Aug 1 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.88.2-0vl2
  245. - rebuilt for VineSeed (4.0)
  246. - added libclamav.pc to devel package
  247. - added Requires: gmp-devel to devel package
  248. * Mon May 1 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  249. - 0.88.2-0vl1
  250. - new upstream release.
  251. * Wed Apr 5 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  252. - 0.88.1-0vl1
  253. - new upstream release.
  254. * Tue Jan 10 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  255. - 0.88-0vl1
  256. - new upstream release.
  257. * Fri Nov 4 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  258. - 0.87.1-0vl1
  259. - new upstream release.
  260. * Sun Sep 18 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  261. - 0.87-0vl1
  262. - new upstream release.
  263. * Mon Jul 25 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  264. - 0.86.2-0vl1
  265. - new upstream release.
  266. * Sun Jun 26 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  267. - 0.86.1-0vl1
  268. - new upstream release.
  269. - fix "Requires:".
  270. * Fri May 27 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  271. - 0.85.1-0vl1
  272. - new upstream release.
  273. * Mon May 16 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  274. - 0.85-0vl1
  275. - new upstream release.
  276. * Sun May 1 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  277. - 0.84-0vl2
  278. - new upstream release.
  279. * Tue Feb 15 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  280. - 0.83-0vl1
  281. - new upstream release.
  282. * Mon Feb 14 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  283. - 0.82-0vl1
  284. - new upstream release.
  285. * Thu Jan 27 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  286. - 0.81-0vl1
  287. - new upstream release.
  288. * Tue Nov 2 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  289. - 0.80-0vl1
  290. - new upstream release.
  291. * Wed Aug 18 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  292. - 0.75-0vl1
  293. - new upstream release.
  294. * Wed May 5 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  295. - 0.70-0vl1
  296. - new upstream release.
  297. * Wed Apr 14 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  298. - 0.68.1-0vl1
  299. - new upstream release.
  300. * Fri Feb 20 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  301. - 0.67-0vl1
  302. - new upstream release.
  303. * Fri Nov 28 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  304. - 0.65-0vl1
  305. - new upstream release.
  306. * Sat Aug 23 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  307. - 0.60-0vl3
  308. - fix %%files.
  309. * Fri Aug 22 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  310. - 0.60-0vl2
  311. - fix 'Requires:' and %%files.
  312. * Thu Aug 21 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  313. - 0.60-0vl1
  314. - new upstream release.
  315. - add a sub-package 'devel'.
  316. * Mon Nov 4 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  317. - 0.53-0vl1
  318. * Wed Oct 30 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  319. - 0.52-0vl1
  320. * Tue Oct 22 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  321. - 0.51-0vl1
  322. - port to Vine Linux from (0.51-1m)
  323. * Fri Oct 11 2002 Kazuhiko <kazuhiko@fdiary.net>
  324. - (0.51-1m)
  325. - major bugfixes
  326. * Sun Oct 6 2002 Kazuhiko <kazuhiko@fdiary.net>
  327. - (0.50-1m)
  328. - major feature enhancements
  329. * Fri Sep 20 2002 Kazuhiko <kazuhiko@fdiary.net>
  330. - (0.24-2m)
  331. - fix permission etc.
  332. * Fri Aug 23 2002 Kazuhiko <kazuhiko@fdiary.net>
  333. - (0.24-1m)
  334. - minor bugfixes
  335. * Sat Aug 3 2002 Kazuhiko <kazuhiko@fdiary.net>
  336. - (0.23-1m)
  337. - minor feature enhancements
  338. * Fri Jul 19 2002 Kazuhiko <kazuhiko@fdiary.net>
  339. - (0.21-1m)
  340. - minor bugfixes
  341. * Mon Jul 15 2002 Kazuhiko <kazuhiko@fdiary.net>
  342. - (0.20-1m)
  343. - revise URL
  344. - add a new program 'sigtool'
  345. * Thu Jun 13 2002 Kazuhiko <kazuhiko@kondara.org>
  346. - (0.15-2k)
  347. * Fri May 31 2002 Kazuhiko <kazuhiko@kondara.org>
  348. - (0.14-2k)
  349. * Thu May 23 2002 Kazuhiko <kazuhiko@kondara.org>
  350. - (0.12-2k)
  351. * Fri May 10 2002 Kazuhiko <kazuhiko@kondara.org>
  352. - (0.11-2k)