SPECS: clamav-database.spec - let version be %{main_version}.%{dai...
glen
glen at pld-linux.org
Wed Dec 27 12:57:51 CET 2006
Author: glen Date: Wed Dec 27 11:57:51 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- let version be %{main_version}.%{daily_version}
---- Files affected:
SPECS:
clamav-database.spec (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SPECS/clamav-database.spec
diff -u SPECS/clamav-database.spec:1.3 SPECS/clamav-database.spec:1.4
--- SPECS/clamav-database.spec:1.3 Wed Dec 27 12:51:58 2006
+++ SPECS/clamav-database.spec Wed Dec 27 12:57:46 2006
@@ -1,10 +1,13 @@
# $Revision$, $Date$
+%define main_version 41
+%define daily_version 2384
%define database_version 20061227
+%define _rel 1
Summary: Virus database for clamav
Summary(pl): Bazy wirusów dla clamava
Name: clamav-database
-Version: 0.88.7.%{database_version}
-Release: 1
+Version: %{main_version}.%{daily_version}
+Release: %{database_version}.%{_rel}
License: GPL
Group: Applications/Databases
Source0: http://db.local.clamav.net/daily.cvd
@@ -12,6 +15,7 @@
Source1: http://db.local.clamav.net/main.cvd
# Source1-md5: 347c99544205184fbc1bd23fd7cfd782
URL: http://www.clamav.net/
+BuildRequires: file
Requires: clamav
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -24,13 +28,24 @@
%prep
%setup -qcT
+cp -a %{SOURCE0} %{SOURCE1} .
+
+%build
+main_version=$(file main.cvd | awk -F, '/version/{print $2}' | awk '{print $NF}')
+daily_version=$(file daily.cvd | awk -F, '/version/{print $2}' | awk '{print $NF}')
+if [ "$main_version" != %{main_version} ]; then
+ : Update %%define main_version $main_version, and retry
+ exit 1
+fi
+if [ "$daily_version" != %{daily_version} ]; then
+ : Update %%define daily_version $daily_version, and retry
+ exit 1
+fi
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/var/lib/clamav,%{_sbindir}}
-
-install %{SOURCE0} $RPM_BUILD_ROOT/var/lib/clamav
-install %{SOURCE1} $RPM_BUILD_ROOT/var/lib/clamav
+install -d $RPM_BUILD_ROOT/var/lib/clamav
+install *.cvd $RPM_BUILD_ROOT/var/lib/clamav
%clean
rm -rf $RPM_BUILD_ROOT
@@ -47,6 +62,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.4 2006/12/27 11:57:46 glen
+- let version be %{main_version}.%{daily_version}
+
Revision 1.3 2006/12/27 11:51:58 qboosh
- pl fix
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/clamav-database.spec?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list