clamav-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  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.1
  11. Release: 1%{?_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. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. BuildRequires: bzip2-devel, curl-devel > 7.10.0, gmp-devel, ncurses-devel
  23. BuildRequires: openssl-devel, zlib-devel
  24. %if %{?milter}
  25. BuildRequires: sendmail-devel
  26. %endif
  27. Requires: bzip2, curl > 7.10.0, gmp, ncurses, openssl, zlib, logrotate
  28. Requires(pre): shadow-utils, grep
  29. Vendor: Project Vine
  30. Distribution: Vine Linux
  31. Packager: tomop, inagaki
  32. %description
  33. Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
  34. AMaViS, compressed files, uses the virus database from
  35. OpenAntivirus.org, and includes a program for auto-updating. The scanner
  36. is multithreaded, written in C, and POSIX compliant.
  37. %description -l ja
  38. Clamアンチウィルスは強力なUNIX向けのアンチウィルススキャナです。
  39. AMaViS、圧縮ファイルをサポートし、OpenAntivirus.orgのウィルスデータ
  40. ベースを利用しています。またウィルスデータベースの自動アップデート
  41. プログラムを含んでいます。 このCで書かれたスキャナはマルチスレッド化
  42. されており、 POSIXに準拠しています。
  43. %if %{?milter}
  44. %package milter
  45. Summary: Virus scanner for sendmail/postfix
  46. Group: Applications/System
  47. %description milter
  48. clamav-milter is a milter module to scan mails using Clam AntiVirus.
  49. %endif
  50. %package devel
  51. Group: Development/Libraries
  52. Summary: headers and libraries for development using Clam AntiVirus
  53. Summary(ja): Clam AntiVirus を用いた開発に必要なヘッダ・ライブラリ
  54. Requires: %{name} = %{version}-%{release}
  55. Requires: zlib-devel bzip2-devel gmp-devel
  56. %description devel
  57. clamav-devel provides headers and libraries for development using
  58. Clam AntiVirus.
  59. %description -l ja devel
  60.  clamav-devel パッケージは、Clam AntiVirus を用いた開発を行うための
  61. ヘッダファイルやライブラリファイルを提供します。
  62. %prep
  63. %setup -q
  64. perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/clamd.pid|' etc/clamd.conf
  65. perl -pi -e 's|^#LogFile .+$|LogFile /var/log/clamav/clamd.log|' etc/clamd.conf
  66. perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/freshclam.pid|' etc/freshclam.conf
  67. perl -pi -e 's|^#UpdateLogFile .+$|UpdateLogFile /var/log/clamav/freshclam.log|' etc/freshclam.conf
  68. perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/clamav-milter.pid|' etc/clamav-milter.conf
  69. perl -pi -e 's|^#LogFile .+$|LogFile /var/log/clamav/clamav-milter.log|' etc/clamav-milter.conf
  70. %build
  71. %if %{?milter}
  72. %configure --disable-clamav --enable-milter --with-dbdir=%{dbdir}
  73. %else
  74. %configure --disable-clamav --with-dbdir=%{dbdir}
  75. %endif
  76. make %{?_smp_mflags}
  77. %install
  78. rm -rf %{buildroot}
  79. mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
  80. mkdir -p %{buildroot}%{_initdir}
  81. mkdir -p %{buildroot}%{_localstatedir}/run/clamav
  82. mkdir -p %{buildroot}%{_localstatedir}/log/clamav
  83. make install DESTDIR=%{buildroot} transform='s,x,x,'
  84. install -m755 %{SOURCE1} %{buildroot}%{_initdir}/clamd
  85. install -m755 %{SOURCE2} %{buildroot}%{_initdir}/freshclam
  86. %if %{?milter}
  87. install -m755 %{SOURCE3} %{buildroot}%{_initdir}/clamav-milter
  88. install -m644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/clamav-milter
  89. %endif
  90. install -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
  91. install etc/clamd.conf %{buildroot}%{_sysconfdir}
  92. install etc/freshclam.conf %{buildroot}%{_sysconfdir}
  93. rm -f %{buildroot}%{_libdir}/lib*a
  94. %clean
  95. rm -rf %{buildroot}
  96. %pre
  97. if ! grep -q '^clamav:' /etc/group; then
  98. /usr/sbin/groupadd -r clamav
  99. fi
  100. if ! grep -q '^clamav:' /etc/passwd; then
  101. /usr/sbin/useradd -M -r -s /bin/false -g clamav -c "Clam Antivirus" clamav || :
  102. fi
  103. %post
  104. /sbin/ldconfig
  105. /sbin/chkconfig --add clamd
  106. /sbin/chkconfig --add freshclam
  107. %preun
  108. if [ "$1" = 0 ]; then
  109. [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamd stop
  110. [ ! -f /var/run/clamav/freshclam.pid ] || /etc/init.d/freshclam stop
  111. /sbin/chkconfig --del clamd
  112. /sbin/chkconfig --del freshclam
  113. fi
  114. %postun
  115. /sbin/ldconfig
  116. if [ "$1" = 0 ]; then
  117. if [ `grep clamav /etc/passwd | wc -l` = 1 ]; then
  118. /usr/sbin/userdel clamav
  119. fi
  120. if [ `grep clamav /etc/group | wc -l` = 1 ]; then
  121. /usr/sbin/groupdel clamav
  122. fi
  123. else
  124. [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamd restart
  125. [ ! -f /var/run/clamav/freshclam.pid ] || /etc/init.d/freshclam restart
  126. fi
  127. %if %{?milter}
  128. %post milter
  129. /sbin/chkconfig --add clamav-milter
  130. %preun milter
  131. if [ "$1" = 0 ]; then
  132. [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamav-milter stop
  133. /sbin/chkconfig --del clamav-milter
  134. fi
  135. %postun milter
  136. if [ "$1" -ge 1 ]; then
  137. [ ! -f /var/run/clamav/clamav-milter.pid ] || /etc/init.d/clamav-milter restart
  138. fi
  139. %endif
  140. %files
  141. %defattr(-,root,root)
  142. %doc AUTHORS BUGS COPYING* ChangeLog FAQ INSTALL NEWS README examples test
  143. %doc README
  144. %doc docs/*
  145. %{_initdir}/clamd
  146. %{_initdir}/freshclam
  147. %config(noreplace) %{_sysconfdir}/clamd.conf
  148. %config(noreplace) %{_sysconfdir}/freshclam.conf
  149. %config(noreplace) %{_sysconfdir}/logrotate.d/clamav
  150. %{_bindir}/*
  151. %exclude %{_bindir}/clamav-config
  152. %{_sbindir}/*
  153. %{_libdir}/lib*.so.*
  154. %attr(-,clamav,clamav) %dir %{_localstatedir}/run/clamav
  155. %attr(-,clamav,clamav) %dir %{_localstatedir}/log/clamav
  156. %attr(-,clamav,clamav) %dir %{dbdir}
  157. %attr(-,clamav,clamav) %config(noreplace) %{dbdir}/*
  158. %exclude %{_mandir}/man8/clamav-milter.8*
  159. %{_mandir}/man*/*
  160. %if %{?milter}
  161. %files milter
  162. %defattr(-,root,root)
  163. %doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README
  164. %{_initdir}/clamav-milter
  165. %config(noreplace) %{_sysconfdir}/clamav-milter.conf
  166. %config(noreplace) %{_sysconfdir}/logrotate.d/clamav-milter
  167. %{_sbindir}/clamav-milter
  168. %{_mandir}/man8/clamav-milter.8*
  169. %endif
  170. %files devel
  171. %defattr(-,root,root)
  172. %doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README
  173. %{_bindir}/clamav-config
  174. %{_libdir}/lib*.so
  175. %{_libdir}/pkgconfig/*.pc
  176. %{_includedir}/*
  177. %changelog
  178. * Thu Jun 09 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.1-1
  179. - new upstream release.
  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)