]> git.pld-linux.org Git - packages/clamav-database.git/blob - clamav-database.spec
1453e2c966933ddf11f7c017610d0c6d4ac9a77b
[packages/clamav-database.git] / clamav-database.spec
1 %define         main_version            52
2 %define         daily_version           1202
3 %define         bytecode_version        68
4 %define         safebrowsing_version    2405
5 %define         database_version        20100927
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:  b1e43b47f292fe18f5fd6155925b756b
17 Source1:        http://db.local.clamav.net/daily.cvd
18 # Source1-md5:  f0ed55471c1af8288e1e46bf5deb2681
19 Source2:        http://db.local.clamav.net/bytecode.cvd
20 # Source2-md5:  62060232b00da9b0eb8e6a31c6236443
21 Source3:        http://db.local.clamav.net/safebrowsing.cvd
22 # Source3-md5:  25f62973c69a17f1a4d9766d79f5179a
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.067059 seconds and 2 git commands to generate.