]> git.pld-linux.org Git - packages/clamav-database.git/blob - clamav-database.spec
- up to 20120809
[packages/clamav-database.git] / clamav-database.spec
1 %define         main_version            54
2 %define         daily_version           1523
3 %define         bytecode_version        188
4 %define         safebrowsing_version    3988
5 %define         database_version        20120809
6 %define         rel     1
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
10 Name:           clamav-database
11 Version:        %{main_version}.%{daily_version}.%{bytecode_version}.%{safebrowsing_version}
12 Release:        %{database_version}.%{rel}
13 License:        GPL
14 Group:          Applications/Databases
15 Source0:        http://db.local.clamav.net/main.cvd
16 # Source0-md5:  eb12490fda87d602e476d4b163f8a34b
17 Source1:        http://db.local.clamav.net/daily.cvd
18 # Source1-md5:  dbbbb3bece4b934d148f1616dd64aba8
19 Source2:        http://db.local.clamav.net/bytecode.cvd
20 # Source2-md5:  fd5ba1e66f8bbf12fc5fbfaa79af6b91
21 Source3:        http://db.local.clamav.net/safebrowsing.cvd
22 # Source3-md5:  679289375b71acc740b8c7ef24e80f99
23 URL:            http://www.clamav.net/
24 BuildRequires:  file
25 Requires:       clamav
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Virus databases for clamav (updated %{database_version}).
31
32 %description  -l hu.UTF-8
33 Vírus adatbázis clamavhoz (%{database_version}).
34
35 %description -l pl.UTF-8
36 Bazy wirusów dla clamava (aktualizowane %{database_version}).
37
38 %prep
39 %setup -qcT
40 cp -a %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} .
41
42 %build
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
49         exit 1
50 fi
51 if [ "$daily_version" != %{daily_version} ]; then
52         : Update %%define daily_version $daily_version, and retry
53         exit 1
54 fi
55 if [ "$bytecode_version" != %{bytecode_version} ]; then
56         : Update %%define bytecode_version $bytecode_version, and retry
57         exit 1
58 fi
59 if [ "$safebrowsing_version" != %{safebrowsing_version} ]; then
60         : Update %%define safebrowsing_version $safebrowsing_version, and retry
61         exit 1
62 fi
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT/var/lib/clamav
67 install *.cvd $RPM_BUILD_ROOT/var/lib/clamav
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %post   -p %{_sbindir}/clamav-post-updatedb
73
74 %files
75 %defattr(644,root,root,755)
76 %attr(644,clamav,root) %verify(not md5 mtime size) /var/lib/clamav/*.cvd
This page took 0.063121 seconds and 3 git commands to generate.