Thu, 09 Aug 2012 18:55:01 +0200
Update version, modernize package, and correct milter and 64-bit lib path.
clamav/clamav.patch | file | annotate | diff | comparison | revisions | |
clamav/clamav.spec | file | annotate | diff | comparison | revisions |
1.1 --- a/clamav/clamav.patch Thu Aug 09 18:53:48 2012 +0200 1.2 +++ b/clamav/clamav.patch Thu Aug 09 18:55:01 2012 +0200 1.3 @@ -1,7 +1,6 @@ 1.4 -diff -Nau clamav-milter/clamav-milter.c.orig clamav-milter/clamav-milter.c 1.5 Index: clamav-milter/clamav-milter.c 1.6 ---- clamav-milter/clamav-milter.c.orig 2009-10-28 16:34:13.000000000 +0100 1.7 -+++ clamav-milter/clamav-milter.c 2009-11-01 15:26:46.212861448 +0100 1.8 +--- clamav-milter/clamav-milter.c.orig 2009-10-28 16:34:13 +0100 1.9 ++++ clamav-milter/clamav-milter.c 2009-11-08 10:27:04 +0100 1.10 @@ -32,7 +32,7 @@ 1.11 #include <syslog.h> 1.12 #endif 1.13 @@ -11,10 +10,9 @@ 1.14 1.15 #include "clamav.h" 1.16 1.17 -diff -Nau clamav-milter/clamfi.c.orig clamav-milter/clamfi.c 1.18 Index: clamav-milter/clamfi.c 1.19 ---- clamav-milter/clamfi.c.orig 2009-10-28 16:34:13.000000000 +0100 1.20 -+++ clamav-milter/clamfi.c 2009-11-01 15:26:46.214251049 +0100 1.21 +--- clamav-milter/clamfi.c.orig 2009-10-28 16:34:13 +0100 1.22 ++++ clamav-milter/clamfi.c 2009-11-08 10:27:04 +0100 1.23 @@ -29,7 +29,7 @@ 1.24 #include <unistd.h> 1.25 #include <ctype.h> 1.26 @@ -24,10 +22,9 @@ 1.27 1.28 #include "shared/optparser.h" 1.29 #include "shared/output.h" 1.30 -diff -Nau clamav-milter/clamfi.h.orig clamav-milter/clamfi.h 1.31 Index: clamav-milter/clamfi.h 1.32 ---- clamav-milter/clamfi.h.orig 2009-07-06 15:21:58.000000000 +0200 1.33 -+++ clamav-milter/clamfi.h 2009-11-01 15:26:46.214882752 +0100 1.34 +--- clamav-milter/clamfi.h.orig 2009-07-06 15:21:58 +0200 1.35 ++++ clamav-milter/clamfi.h 2009-11-08 10:27:04 +0100 1.36 @@ -22,7 +22,7 @@ 1.37 #define _CLAMFI_H 1.38 1.39 @@ -37,10 +34,9 @@ 1.40 1.41 extern uint64_t maxfilesize; 1.42 extern int addxvirus; 1.43 -diff -Nau configure.orig configure 1.44 Index: configure 1.45 ---- configure.orig 2009-10-28 16:34:13.000000000 +0100 1.46 -+++ configure 2009-11-01 15:29:06.145022137 +0100 1.47 +--- configure.orig 2009-10-28 16:34:13 +0100 1.48 ++++ configure 2009-11-08 10:27:32 +0100 1.49 @@ -16692,9 +16692,6 @@ 1.50 1.51 save_LIBS="$LIBS" 1.52 @@ -51,22 +47,18 @@ 1.53 LIBS="$LIBS -lmilter $CLAMAV_MILTER_LIBS" 1.54 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mi_stop in -lmilter" >&5 1.55 $as_echo_n "checking for mi_stop in -lmilter... " >&6; } 1.56 -@@ -16842,9 +16839,9 @@ 1.57 +@@ -16842,7 +16839,7 @@ 1.58 fi 1.59 1.60 LIBS="$save_LIBS" 1.61 - for ac_header in libmilter/mfapi.h 1.62 + for ac_header in milter/mfapi.h 1.63 do : 1.64 -- ac_fn_c_check_header_mongrel "$LINENO" "libmilter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" 1.65 -+ ac_fn_c_check_header_mongrel "$LINENO" "milter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" 1.66 + ac_fn_c_check_header_mongrel "$LINENO" "libmilter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" 1.67 if test "x$ac_cv_header_libmilter_mfapi_h" = x""yes; then : 1.68 - cat >>confdefs.h <<_ACEOF 1.69 - #define HAVE_LIBMILTER_MFAPI_H 1 1.70 -diff -Nau libclamav/others.c.orig libclamav/others.c 1.71 Index: libclamav/others.c 1.72 ---- libclamav/others.c.orig 2009-10-28 16:34:13.000000000 +0100 1.73 -+++ libclamav/others.c 2009-11-01 15:26:46.257883269 +0100 1.74 +--- libclamav/others.c.orig 2009-10-28 16:34:13 +0100 1.75 ++++ libclamav/others.c 2009-11-08 10:27:04 +0100 1.76 @@ -177,8 +177,10 @@ 1.77 if(is_rar_initd) return; 1.78 is_rar_initd = 1; 1.79 @@ -78,10 +70,9 @@ 1.80 return; 1.81 1.82 if (!(cli_unrar_open = (int(*)(int, const char *, unrar_state_t *))lt_dlsym(rhandle, "libclamunrar_iface_LTX_unrar_open")) || 1.83 -diff -Nau shared/output.c.orig shared/output.c 1.84 Index: shared/output.c 1.85 ---- shared/output.c.orig 2009-10-28 16:34:13.000000000 +0100 1.86 -+++ shared/output.c 2009-11-01 15:26:46.259056039 +0100 1.87 +--- shared/output.c.orig 2009-10-28 16:34:13 +0100 1.88 ++++ shared/output.c 2009-11-08 10:27:04 +0100 1.89 @@ -67,7 +67,7 @@ 1.90 pthread_mutex_t logg_mutex = PTHREAD_MUTEX_INITIALIZER; 1.91 #endif
2.1 --- a/clamav/clamav.spec Thu Aug 09 18:53:48 2012 +0200 2.2 +++ b/clamav/clamav.spec Thu Aug 09 18:55:01 2012 +0200 2.3 @@ -38,8 +38,8 @@ 2.4 Class: EVAL 2.5 Group: AntiVirus 2.6 License: GPL 2.7 -Version: 0.95.3 2.8 -Release: 20091102 2.9 +Version: 0.97.5 2.10 +Release: 20120800 2.11 2.12 # package options 2.13 %option with_milter no 2.14 @@ -50,18 +50,14 @@ 2.15 Patch0: clamav.patch 2.16 2.17 # build information 2.18 -Prefix: %{l_prefix} 2.19 -BuildRoot: %{l_buildroot} 2.20 -BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, bzip2, pkgconfig, bc 2.21 -PreReq: OpenPKG, openpkg >= 20060823 2.22 +BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, bzip2, pkgconfig, bc 2.23 +PreReq: OpenPKG, openpkg >= 20100101 2.24 BuildPreReq: zlib, bzip2, curl, gmp, libiconv, openssl 2.25 PreReq: zlib, bzip2, curl, gmp, libiconv, openssl 2.26 %if "%{with_milter}" == "yes" 2.27 BuildPreReq: milter 2.28 PreReq: milter 2.29 %endif 2.30 -AutoReq: no 2.31 -AutoReqProv: no 2.32 2.33 %description 2.34 Clam AntiVirus is an anti-virus toolkit for UNIX. The main 2.35 @@ -83,6 +79,9 @@ 2.36 %prep 2.37 %setup -q 2.38 %patch -p0 2.39 + %{l_shtool} subst \ 2.40 + -e 's;lib\(milter/mfapi.h\);\1;' \ 2.41 + configure 2.42 2.43 %build 2.44 # configure package 2.45 @@ -93,6 +92,7 @@ 2.46 GREP="grep" \ 2.47 ./configure \ 2.48 --prefix=%{l_prefix} \ 2.49 + --libdir=%{l_prefix}/lib \ 2.50 --mandir=%{l_prefix}/man \ 2.51 --sysconfdir=%{l_prefix}/etc/clamav \ 2.52 --with-zlib=%{l_prefix} \ 2.53 @@ -117,10 +117,8 @@ 2.54 %{l_make} %{l_mflags -O} 2.55 2.56 %install 2.57 - rm -rf $RPM_BUILD_ROOT 2.58 - 2.59 # perform standard package installation 2.60 - %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 2.61 + %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" 2.62 2.63 # install default configuration 2.64 %{l_shtool} mkdir -f -p -m 755 \ 2.65 @@ -165,13 +163,11 @@ 2.66 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 2.67 %{l_files_std} \ 2.68 '%config %{l_prefix}/etc/clamav/*.conf' \ 2.69 - '%attr(755,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/clamav' \ 2.70 - '%attr(755,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/clamav' 2.71 + '%attr(755,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/clamav' 2.72 2.73 %files -f files 2.74 2.75 %clean 2.76 - rm -rf $RPM_BUILD_ROOT 2.77 2.78 %pre 2.79 # before upgrade, save status and stop service