1 %define main_version 57
2 %define daily_version 2146
3 %define bytecode_version 275
4 %define safebrowsing_version 4450
5 %define database_version 20160318
7 Summary: Virus databases for clamav
8 Summary(hu.UTF-8): Vírus adatbázis clamav-hoz
9 Summary(pl.UTF-8): Bazy wirusów dla clamava
11 Version: %{main_version}.%{daily_version}.%{bytecode_version}.%{safebrowsing_version}
12 Release: %{database_version}.%{rel}
14 Group: Applications/Databases
15 Source0: http://db.local.clamav.net/main.cvd
16 # Source0-md5: f13ead862171f50019c15c946d25e91f
17 Source1: http://db.local.clamav.net/daily.cvd
18 # Source1-md5: 094537361a304e7fb3db64e11482cd9f
19 Source2: http://db.local.clamav.net/bytecode.cvd
20 # Source2-md5: 656e67f4237f33ca5ee087a33b696d90
21 Source3: http://db.local.clamav.net/safebrowsing.cvd
22 # Source3-md5: 2084da0d4ab09c719be128f893840b17
23 URL: http://www.clamav.net/
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Virus databases for clamav (updated %{database_version}).
32 %description -l hu.UTF-8
33 Vírus adatbázis clamavhoz (%{database_version}).
35 %description -l pl.UTF-8
36 Bazy wirusów dla clamava (aktualizowane %{database_version}).
40 cp -a %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} .
43 main_version=$(file main.cvd | awk -F, '/version/{print $2}' | awk '{print $NF}')
44 daily_version=$(file daily.cvd | awk -F, '/version/{print $2}' | awk '{print $NF}')
45 bytecode_version=$(file bytecode.cvd | awk -F, '/version/{print $2}' | awk '{print $NF}')
46 safebrowsing_version=$(file safebrowsing.cvd | awk -F, '/version/{print $2}' | awk '{print $NF}')
47 if [ "$main_version" != %{main_version} ]; then
48 : Update %%define main_version $main_version, and retry
51 if [ "$daily_version" != %{daily_version} ]; then
52 : Update %%define daily_version $daily_version, and retry
55 if [ "$bytecode_version" != %{bytecode_version} ]; then
56 : Update %%define bytecode_version $bytecode_version, and retry
59 if [ "$safebrowsing_version" != %{safebrowsing_version} ]; then
60 : Update %%define safebrowsing_version $safebrowsing_version, and retry
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT/var/lib/clamav
67 install *.cvd $RPM_BUILD_ROOT/var/lib/clamav
70 rm -rf $RPM_BUILD_ROOT
72 %post -p %{_sbindir}/clamav-post-updatedb
75 %defattr(644,root,root,755)
76 %attr(644,clamav,root) %verify(not md5 mtime size) /var/lib/clamav/*.cvd