| 36 Packager: OpenPKG Foundation e.V. |
36 Packager: OpenPKG Foundation e.V. |
| 37 Distribution: OpenPKG Community |
37 Distribution: OpenPKG Community |
| 38 Class: EVAL |
38 Class: EVAL |
| 39 Group: AntiVirus |
39 Group: AntiVirus |
| 40 License: GPL |
40 License: GPL |
| 41 Version: 0.95.3 |
41 Version: 0.97.5 |
| 42 Release: 20091102 |
42 Release: 20120800 |
| 43 |
43 |
| 44 # package options |
44 # package options |
| 45 %option with_milter no |
45 %option with_milter no |
| 46 |
46 |
| 47 # list of sources |
47 # list of sources |
| 48 Source0: http://switch.dl.sourceforge.net/clamav/clamav-%{version}.tar.gz |
48 Source0: http://switch.dl.sourceforge.net/clamav/clamav-%{version}.tar.gz |
| 49 Source1: rc.clamav |
49 Source1: rc.clamav |
| 50 Patch0: clamav.patch |
50 Patch0: clamav.patch |
| 51 |
51 |
| 52 # build information |
52 # build information |
| 53 Prefix: %{l_prefix} |
53 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, bzip2, pkgconfig, bc |
| 54 BuildRoot: %{l_buildroot} |
54 PreReq: OpenPKG, openpkg >= 20100101 |
| 55 BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, bzip2, pkgconfig, bc |
|
| 56 PreReq: OpenPKG, openpkg >= 20060823 |
|
| 57 BuildPreReq: zlib, bzip2, curl, gmp, libiconv, openssl |
55 BuildPreReq: zlib, bzip2, curl, gmp, libiconv, openssl |
| 58 PreReq: zlib, bzip2, curl, gmp, libiconv, openssl |
56 PreReq: zlib, bzip2, curl, gmp, libiconv, openssl |
| 59 %if "%{with_milter}" == "yes" |
57 %if "%{with_milter}" == "yes" |
| 60 BuildPreReq: milter |
58 BuildPreReq: milter |
| 61 PreReq: milter |
59 PreReq: milter |
| 62 %endif |
60 %endif |
| 63 AutoReq: no |
|
| 64 AutoReqProv: no |
|
| 65 |
61 |
| 66 %description |
62 %description |
| 67 Clam AntiVirus is an anti-virus toolkit for UNIX. The main |
63 Clam AntiVirus is an anti-virus toolkit for UNIX. The main |
| 68 purpose of this software is the integration with mail servers |
64 purpose of this software is the integration with mail servers |
| 69 (attachment scanning). The package provides a flexible and scalable |
65 (attachment scanning). The package provides a flexible and scalable |
| 81 } |
77 } |
| 82 |
78 |
| 83 %prep |
79 %prep |
| 84 %setup -q |
80 %setup -q |
| 85 %patch -p0 |
81 %patch -p0 |
| |
82 %{l_shtool} subst \ |
| |
83 -e 's;lib\(milter/mfapi.h\);\1;' \ |
| |
84 configure |
| 86 |
85 |
| 87 %build |
86 %build |
| 88 # configure package |
87 # configure package |
| 89 CC="%{l_cc}" \ |
88 CC="%{l_cc}" \ |
| 90 CFLAGS="%{l_cflags -O}" \ |
89 CFLAGS="%{l_cflags -O}" \ |
| 91 CPPFLAGS="%{l_cppflags}" \ |
90 CPPFLAGS="%{l_cppflags}" \ |
| 92 LDFLAGS="%{l_ldflags}" \ |
91 LDFLAGS="%{l_ldflags}" \ |
| 93 GREP="grep" \ |
92 GREP="grep" \ |
| 94 ./configure \ |
93 ./configure \ |
| 95 --prefix=%{l_prefix} \ |
94 --prefix=%{l_prefix} \ |
| |
95 --libdir=%{l_prefix}/lib \ |
| 96 --mandir=%{l_prefix}/man \ |
96 --mandir=%{l_prefix}/man \ |
| 97 --sysconfdir=%{l_prefix}/etc/clamav \ |
97 --sysconfdir=%{l_prefix}/etc/clamav \ |
| 98 --with-zlib=%{l_prefix} \ |
98 --with-zlib=%{l_prefix} \ |
| 99 --with-libcurl \ |
99 --with-libcurl \ |
| 100 --with-user=%{l_rusr} \ |
100 --with-user=%{l_rusr} \ |
| 115 |
115 |
| 116 # build package |
116 # build package |
| 117 %{l_make} %{l_mflags -O} |
117 %{l_make} %{l_mflags -O} |
| 118 |
118 |
| 119 %install |
119 %install |
| 120 rm -rf $RPM_BUILD_ROOT |
|
| 121 |
|
| 122 # perform standard package installation |
120 # perform standard package installation |
| 123 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
121 %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" |
| 124 |
122 |
| 125 # install default configuration |
123 # install default configuration |
| 126 %{l_shtool} mkdir -f -p -m 755 \ |
124 %{l_shtool} mkdir -f -p -m 755 \ |
| 127 $RPM_BUILD_ROOT%{l_prefix}/etc/clamav |
125 $RPM_BUILD_ROOT%{l_prefix}/etc/clamav |
| 128 %{l_shtool} install -c -m 644 \ |
126 %{l_shtool} install -c -m 644 \ |
| 163 |
161 |
| 164 # determine installation files |
162 # determine installation files |
| 165 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
163 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
| 166 %{l_files_std} \ |
164 %{l_files_std} \ |
| 167 '%config %{l_prefix}/etc/clamav/*.conf' \ |
165 '%config %{l_prefix}/etc/clamav/*.conf' \ |
| 168 '%attr(755,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/clamav' \ |
166 '%attr(755,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/clamav' |
| 169 '%attr(755,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/clamav' |
|
| 170 |
167 |
| 171 %files -f files |
168 %files -f files |
| 172 |
169 |
| 173 %clean |
170 %clean |
| 174 rm -rf $RPM_BUILD_ROOT |
|
| 175 |
171 |
| 176 %pre |
172 %pre |
| 177 # before upgrade, save status and stop service |
173 # before upgrade, save status and stop service |
| 178 [ $1 -eq 2 ] || exit 0 |
174 [ $1 -eq 2 ] || exit 0 |
| 179 eval `%{l_rc} clamav status 2>/dev/null | tee %{l_tmpfile}` |
175 eval `%{l_rc} clamav status 2>/dev/null | tee %{l_tmpfile}` |