clamav-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. %define dbdir %{_localstatedir}/lib/clamav
  2. %if %{?_dist_release}!="vl5"
  3. %define milter 1
  4. %endif
  5. Summary: Clam AntiVirus
  6. Summary(ja): Clamアンチウィルススキャナ
  7. Name: clamav
  8. Version: 0.96.5
  9. Release: 1%{?_dist_release}
  10. License: GPL
  11. Group: Applications/System
  12. URL: http://www.clamav.net/
  13. Source0: http://clamav.elektrapro.com/stable/%{name}-%{version}.tar.gz
  14. Source1: clamd.init
  15. Source2: freshclam.init
  16. Source3: clamav-milter.init
  17. Source4: clamav.logrotate
  18. Source5: clamav-milter.logrotate
  19. Source100: README.clamd-vine
  20. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  21. BuildRequires: bzip2-devel, curl-devel > 7.10.0, gmp-devel, ncurses-devel
  22. BuildRequires: openssl-devel, zlib-devel
  23. %if %{?milter}
  24. BuildRequires: sendmail-devel
  25. %endif
  26. Requires: bzip2, curl > 7.10.0, gmp, ncurses, openssl, zlib, logrotate
  27. Requires(pre): shadow-utils, grep
  28. Vendor: Project Vine
  29. Distribution: Vine Linux
  30. Packager: tomop, inagaki
  31. %description
  32. Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
  33. AMaViS, compressed files, uses the virus database from
  34. OpenAntivirus.org, and includes a program for auto-updating. The scanner
  35. is multithreaded, written in C, and POSIX compliant.
  36. %description -l ja
  37. Clamアンチウィルスは強力なUNIX向けのアンチウィルススキャナです。
  38. AMaViS、圧縮ファイルをサポートし、OpenAntivirus.orgのウィルスデータ
  39. ベースを利用しています。またウィルスデータベースの自動アップデート
  40. プログラムを含んでいます。 このCで書かれたスキャナはマルチスレッド化
  41. されており、 POSIXに準拠しています。
  42. %if %{?milter}
  43. %package milter
  44. Summary: Virus scanner for sendmail/postfix
  45. Group: Applications/System
  46. %description milter
  47. clamav-milter is a milter module to scan mails using Clam AntiVirus.
  48. %endif
  49. %package devel
  50. Group: Development/Libraries
  51. Summary: headers and libraries for development using Clam AntiVirus
  52. Summary(ja): Clam AntiVirus を用いた開発に必要なヘッダ・ライブラリ
  53. Requires: %{name} = %{version}-%{release}
  54. Requires: zlib-devel bzip2-devel gmp-devel
  55. %description devel
  56. clamav-devel provides headers and libraries for development using
  57. Clam AntiVirus.
  58. %description -l ja devel
  59.  clamav-devel パッケージは、Clam AntiVirus を用いた開発を行うための
  60. ヘッダファイルやライブラリファイルを提供します。
  61. %prep
  62. %setup -q
  63. cp %{SOURCE100} .
  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. * Fri Dec 03 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.5-1
  179. - new upstream release.
  180. * Sat Nov 27 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-3
  181. - moved virus databases to /var/lib/clamav.
  182. * Wed Nov 17 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-2
  183. - added milter support.
  184. * Fri Nov 05 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-1
  185. - new upstream release.
  186. - added logrotate support.
  187. - fixed pre/post scripts for daemons.
  188. * Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 0.96-2
  189. - rebuilt with rpm-4.8.1 for pkg-config
  190. * Sun Apr 11 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.96-1
  191. - new upstream release.
  192. * Sat Jan 30 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.95.3-1
  193. - new upstream release.
  194. * Thu Jun 11 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95.2-1
  195. - new upstream release.
  196. * Tue Jun 2 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95.1-1
  197. - new upstream release.
  198. * Tue Mar 24 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95-2
  199. - dropped *.a files.
  200. * Tue Mar 24 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95-1
  201. - new upstream release.
  202. * Tue Jun 10 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.93.1-1
  203. - new upstream release.
  204. - wrote specfile in UTF-8.
  205. * Tue Apr 15 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.93-1
  206. - new upstream release.
  207. - move clamd.init to /etc/rc.d/init.d/.
  208. - add /etc/rc.d/init.d/freshclam.
  209. * Thu Apr 10 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-1
  210. - apply new versioning policy.
  211. * Sat Mar 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-0vl0.40.1
  212. - add missing files.
  213. * Sat Mar 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-0vl0.40
  214. - new upstream release.
  215. * Tue Aug 21 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.91.2-0vl0.40
  216. - new upstream release.
  217. * Thu Aug 9 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.91.1-0vl0.40
  218. - new upstream release.
  219. * Fri Mar 2 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.90.1-0vl0.40
  220. - new upstream release.
  221. * Mon Feb 26 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.90-0vl0.40
  222. - new upstream release.
  223. * Thu Feb 1 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.7-0vl0.40
  224. - for Vine Linux 4.0.
  225. - new upstream release.
  226. * Tue Nov 7 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.6-0vl1
  227. - built for VineSeed.
  228. * Mon Nov 6 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.6-0vl0.1
  229. - new upstream release.
  230. * Thu Oct 19 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.5-0vl0.1
  231. - new upstream release.
  232. * Wed Aug 16 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.4-0vl0.1
  233. - rebuilt for Vine Linux 3.x.
  234. * Wed Aug 16 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.4-0vl1
  235. - new upstream release.
  236. * Sat Aug 5 2006 IWAI, Masaharu <iwai@alib.jp> 0.88.2-0vl3
  237. - add clamd.init script in doc dir
  238. * Mon Aug 1 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.88.2-0vl2
  239. - rebuilt for VineSeed (4.0)
  240. - added libclamav.pc to devel package
  241. - added Requires: gmp-devel to devel package
  242. * Mon May 1 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  243. - 0.88.2-0vl1
  244. - new upstream release.
  245. * Wed Apr 5 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  246. - 0.88.1-0vl1
  247. - new upstream release.
  248. * Tue Jan 10 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  249. - 0.88-0vl1
  250. - new upstream release.
  251. * Fri Nov 4 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  252. - 0.87.1-0vl1
  253. - new upstream release.
  254. * Sun Sep 18 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  255. - 0.87-0vl1
  256. - new upstream release.
  257. * Mon Jul 25 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  258. - 0.86.2-0vl1
  259. - new upstream release.
  260. * Sun Jun 26 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  261. - 0.86.1-0vl1
  262. - new upstream release.
  263. - fix "Requires:".
  264. * Fri May 27 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  265. - 0.85.1-0vl1
  266. - new upstream release.
  267. * Mon May 16 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  268. - 0.85-0vl1
  269. - new upstream release.
  270. * Sun May 1 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  271. - 0.84-0vl2
  272. - new upstream release.
  273. * Tue Feb 15 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  274. - 0.83-0vl1
  275. - new upstream release.
  276. * Mon Feb 14 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  277. - 0.82-0vl1
  278. - new upstream release.
  279. * Thu Jan 27 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  280. - 0.81-0vl1
  281. - new upstream release.
  282. * Tue Nov 2 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  283. - 0.80-0vl1
  284. - new upstream release.
  285. * Wed Aug 18 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  286. - 0.75-0vl1
  287. - new upstream release.
  288. * Wed May 5 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  289. - 0.70-0vl1
  290. - new upstream release.
  291. * Wed Apr 14 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  292. - 0.68.1-0vl1
  293. - new upstream release.
  294. * Fri Feb 20 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  295. - 0.67-0vl1
  296. - new upstream release.
  297. * Fri Nov 28 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  298. - 0.65-0vl1
  299. - new upstream release.
  300. * Sat Aug 23 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  301. - 0.60-0vl3
  302. - fix %%files.
  303. * Fri Aug 22 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  304. - 0.60-0vl2
  305. - fix 'Requires:' and %%files.
  306. * Thu Aug 21 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  307. - 0.60-0vl1
  308. - new upstream release.
  309. - add a sub-package 'devel'.
  310. * Mon Nov 4 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  311. - 0.53-0vl1
  312. * Wed Oct 30 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  313. - 0.52-0vl1
  314. * Tue Oct 22 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  315. - 0.51-0vl1
  316. - port to Vine Linux from (0.51-1m)
  317. * Fri Oct 11 2002 Kazuhiko <kazuhiko@fdiary.net>
  318. - (0.51-1m)
  319. - major bugfixes
  320. * Sun Oct 6 2002 Kazuhiko <kazuhiko@fdiary.net>
  321. - (0.50-1m)
  322. - major feature enhancements
  323. * Fri Sep 20 2002 Kazuhiko <kazuhiko@fdiary.net>
  324. - (0.24-2m)
  325. - fix permission etc.
  326. * Fri Aug 23 2002 Kazuhiko <kazuhiko@fdiary.net>
  327. - (0.24-1m)
  328. - minor bugfixes
  329. * Sat Aug 3 2002 Kazuhiko <kazuhiko@fdiary.net>
  330. - (0.23-1m)
  331. - minor feature enhancements
  332. * Fri Jul 19 2002 Kazuhiko <kazuhiko@fdiary.net>
  333. - (0.21-1m)
  334. - minor bugfixes
  335. * Mon Jul 15 2002 Kazuhiko <kazuhiko@fdiary.net>
  336. - (0.20-1m)
  337. - revise URL
  338. - add a new program 'sigtool'
  339. * Thu Jun 13 2002 Kazuhiko <kazuhiko@kondara.org>
  340. - (0.15-2k)
  341. * Fri May 31 2002 Kazuhiko <kazuhiko@kondara.org>
  342. - (0.14-2k)
  343. * Thu May 23 2002 Kazuhiko <kazuhiko@kondara.org>
  344. - (0.12-2k)
  345. * Fri May 10 2002 Kazuhiko <kazuhiko@kondara.org>
  346. - (0.11-2k)