clamav-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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.98
  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. mv %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample %{buildroot}%{_sysconfdir}/clamav-milter.conf
  90. %endif
  91. install -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
  92. mv %{buildroot}%{_sysconfdir}/clamd.conf.sample %{buildroot}%{_sysconfdir}/clamd.conf
  93. mv %{buildroot}%{_sysconfdir}/freshclam.conf.sample %{buildroot}%{_sysconfdir}/freshclam.conf
  94. rm -f %{buildroot}%{_libdir}/lib*a
  95. mkdir -p %{buildroot}%{dbdir}
  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(0755,clamav,clamav) %dir %{dbdir}
  159. #%attr(-,clamav,clamav) %config(noreplace) %{dbdir}/main.cvd
  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. * Thu Oct 03 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.98-1
  181. - new upstream release.
  182. * Fri May 10 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.8-1
  183. - new upstream release.
  184. * Thu Mar 21 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.7-1
  185. - new upstream release.
  186. - fixed date of %%changelog.
  187. * Tue Sep 18 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.6-2
  188. - tarball was replaced on upstream.
  189. * Mon Sep 17 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.6-1
  190. - new upstream release.
  191. * Fri Jun 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.5-1
  192. - new upstream release.
  193. - removed /var/lib/clamav/main.cvd (by upstream).
  194. * Mon Mar 19 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.4-1
  195. - new upstream release.
  196. - removed /var/lib/clamav/daily.cvd.
  197. * Wed Dec 14 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.3-1
  198. - new upstream release.
  199. * Thu Aug 04 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.2-1
  200. - new upstream release.
  201. * Thu Jun 09 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97.1-1
  202. - new upstream release.
  203. * Sun Mar 27 2011 IWAI, Masaharu <iwai@alib.jp> 0.97-2
  204. - add else routine for milter: fix building on Vine Linux 5
  205. * Tue Feb 08 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.97-1
  206. - new upstream release.
  207. * Fri Dec 03 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.5-1
  208. - new upstream release.
  209. * Sat Nov 27 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-3
  210. - moved virus databases to /var/lib/clamav.
  211. * Wed Nov 17 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-2
  212. - added milter support.
  213. * Fri Nov 05 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.96.4-1
  214. - new upstream release.
  215. - added logrotate support.
  216. - fixed pre/post scripts for daemons.
  217. * Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 0.96-2
  218. - rebuilt with rpm-4.8.1 for pkg-config
  219. * Sun Apr 11 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.96-1
  220. - new upstream release.
  221. * Sat Jan 30 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.95.3-1
  222. - new upstream release.
  223. * Thu Jun 11 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95.2-1
  224. - new upstream release.
  225. * Tue Jun 2 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95.1-1
  226. - new upstream release.
  227. * Tue Mar 24 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95-2
  228. - dropped *.a files.
  229. * Tue Mar 24 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.95-1
  230. - new upstream release.
  231. * Tue Jun 10 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.93.1-1
  232. - new upstream release.
  233. - wrote specfile in UTF-8.
  234. * Tue Apr 15 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.93-1
  235. - new upstream release.
  236. - move clamd.init to /etc/rc.d/init.d/.
  237. - add /etc/rc.d/init.d/freshclam.
  238. * Thu Apr 10 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-1
  239. - apply new versioning policy.
  240. * Sat Mar 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-0vl0.40.1
  241. - add missing files.
  242. * Sat Mar 1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.92.1-0vl0.40
  243. - new upstream release.
  244. * Tue Aug 21 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.91.2-0vl0.40
  245. - new upstream release.
  246. * Thu Aug 9 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.91.1-0vl0.40
  247. - new upstream release.
  248. * Fri Mar 2 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.90.1-0vl0.40
  249. - new upstream release.
  250. * Mon Feb 26 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.90-0vl0.40
  251. - new upstream release.
  252. * Thu Feb 1 2007 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.7-0vl0.40
  253. - for Vine Linux 4.0.
  254. - new upstream release.
  255. * Tue Nov 7 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.6-0vl1
  256. - built for VineSeed.
  257. * Mon Nov 6 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.6-0vl0.1
  258. - new upstream release.
  259. * Thu Oct 19 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.5-0vl0.1
  260. - new upstream release.
  261. * Wed Aug 16 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.4-0vl0.1
  262. - rebuilt for Vine Linux 3.x.
  263. * Wed Aug 16 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 0.88.4-0vl1
  264. - new upstream release.
  265. * Sat Aug 5 2006 IWAI, Masaharu <iwai@alib.jp> 0.88.2-0vl3
  266. - add clamd.init script in doc dir
  267. * Tue Aug 1 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.88.2-0vl2
  268. - rebuilt for VineSeed (4.0)
  269. - added libclamav.pc to devel package
  270. - added Requires: gmp-devel to devel package
  271. * Mon May 1 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  272. - 0.88.2-0vl1
  273. - new upstream release.
  274. * Wed Apr 5 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  275. - 0.88.1-0vl1
  276. - new upstream release.
  277. * Tue Jan 10 2006 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  278. - 0.88-0vl1
  279. - new upstream release.
  280. * Fri Nov 4 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  281. - 0.87.1-0vl1
  282. - new upstream release.
  283. * Sun Sep 18 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  284. - 0.87-0vl1
  285. - new upstream release.
  286. * Mon Jul 25 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  287. - 0.86.2-0vl1
  288. - new upstream release.
  289. * Sun Jun 26 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  290. - 0.86.1-0vl1
  291. - new upstream release.
  292. - fix "Requires:".
  293. * Fri May 27 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  294. - 0.85.1-0vl1
  295. - new upstream release.
  296. * Mon May 16 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  297. - 0.85-0vl1
  298. - new upstream release.
  299. * Sun May 1 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  300. - 0.84-0vl2
  301. - new upstream release.
  302. * Tue Feb 15 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  303. - 0.83-0vl1
  304. - new upstream release.
  305. * Mon Feb 14 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  306. - 0.82-0vl1
  307. - new upstream release.
  308. * Thu Jan 27 2005 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  309. - 0.81-0vl1
  310. - new upstream release.
  311. * Tue Nov 2 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  312. - 0.80-0vl1
  313. - new upstream release.
  314. * Wed Aug 18 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  315. - 0.75-0vl1
  316. - new upstream release.
  317. * Wed May 5 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  318. - 0.70-0vl1
  319. - new upstream release.
  320. * Wed Apr 14 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  321. - 0.68.1-0vl1
  322. - new upstream release.
  323. * Fri Feb 20 2004 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  324. - 0.67-0vl1
  325. - new upstream release.
  326. * Fri Nov 28 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  327. - 0.65-0vl1
  328. - new upstream release.
  329. * Sat Aug 23 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  330. - 0.60-0vl3
  331. - fix %%files.
  332. * Fri Aug 22 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  333. - 0.60-0vl2
  334. - fix 'Requires:' and %%files.
  335. * Thu Aug 21 2003 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net>
  336. - 0.60-0vl1
  337. - new upstream release.
  338. - add a sub-package 'devel'.
  339. * Mon Nov 4 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  340. - 0.53-0vl1
  341. * Wed Oct 30 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  342. - 0.52-0vl1
  343. * Tue Oct 22 2002 TORAYA Shin-ichi <shin@tora-jp.com>
  344. - 0.51-0vl1
  345. - port to Vine Linux from (0.51-1m)
  346. * Fri Oct 11 2002 Kazuhiko <kazuhiko@fdiary.net>
  347. - (0.51-1m)
  348. - major bugfixes
  349. * Sun Oct 6 2002 Kazuhiko <kazuhiko@fdiary.net>
  350. - (0.50-1m)
  351. - major feature enhancements
  352. * Fri Sep 20 2002 Kazuhiko <kazuhiko@fdiary.net>
  353. - (0.24-2m)
  354. - fix permission etc.
  355. * Fri Aug 23 2002 Kazuhiko <kazuhiko@fdiary.net>
  356. - (0.24-1m)
  357. - minor bugfixes
  358. * Sat Aug 3 2002 Kazuhiko <kazuhiko@fdiary.net>
  359. - (0.23-1m)
  360. - minor feature enhancements
  361. * Fri Jul 19 2002 Kazuhiko <kazuhiko@fdiary.net>
  362. - (0.21-1m)
  363. - minor bugfixes
  364. * Mon Jul 15 2002 Kazuhiko <kazuhiko@fdiary.net>
  365. - (0.20-1m)
  366. - revise URL
  367. - add a new program 'sigtool'
  368. * Thu Jun 13 2002 Kazuhiko <kazuhiko@kondara.org>
  369. - (0.15-2k)
  370. * Fri May 31 2002 Kazuhiko <kazuhiko@kondara.org>
  371. - (0.14-2k)
  372. * Thu May 23 2002 Kazuhiko <kazuhiko@kondara.org>
  373. - (0.12-2k)
  374. * Fri May 10 2002 Kazuhiko <kazuhiko@kondara.org>
  375. - (0.11-2k)