# HG changeset patch # User Michael Schloh von Bennewitz # Date 1344531301 -7200 # Node ID c6b0e6c7f67df7de0b56668c9391aeb68c7f1e63 # Parent 3695593c147afb72c1277a8e0e518da369ecf23d Update version, modernize package, and correct milter and 64-bit lib path. diff -r 3695593c147a -r c6b0e6c7f67d clamav/clamav.patch --- a/clamav/clamav.patch Thu Aug 09 18:53:48 2012 +0200 +++ b/clamav/clamav.patch Thu Aug 09 18:55:01 2012 +0200 @@ -1,7 +1,6 @@ -diff -Nau clamav-milter/clamav-milter.c.orig clamav-milter/clamav-milter.c Index: clamav-milter/clamav-milter.c ---- clamav-milter/clamav-milter.c.orig 2009-10-28 16:34:13.000000000 +0100 -+++ clamav-milter/clamav-milter.c 2009-11-01 15:26:46.212861448 +0100 +--- clamav-milter/clamav-milter.c.orig 2009-10-28 16:34:13 +0100 ++++ clamav-milter/clamav-milter.c 2009-11-08 10:27:04 +0100 @@ -32,7 +32,7 @@ #include #endif @@ -11,10 +10,9 @@ #include "clamav.h" -diff -Nau clamav-milter/clamfi.c.orig clamav-milter/clamfi.c Index: clamav-milter/clamfi.c ---- clamav-milter/clamfi.c.orig 2009-10-28 16:34:13.000000000 +0100 -+++ clamav-milter/clamfi.c 2009-11-01 15:26:46.214251049 +0100 +--- clamav-milter/clamfi.c.orig 2009-10-28 16:34:13 +0100 ++++ clamav-milter/clamfi.c 2009-11-08 10:27:04 +0100 @@ -29,7 +29,7 @@ #include #include @@ -24,10 +22,9 @@ #include "shared/optparser.h" #include "shared/output.h" -diff -Nau clamav-milter/clamfi.h.orig clamav-milter/clamfi.h Index: clamav-milter/clamfi.h ---- clamav-milter/clamfi.h.orig 2009-07-06 15:21:58.000000000 +0200 -+++ clamav-milter/clamfi.h 2009-11-01 15:26:46.214882752 +0100 +--- clamav-milter/clamfi.h.orig 2009-07-06 15:21:58 +0200 ++++ clamav-milter/clamfi.h 2009-11-08 10:27:04 +0100 @@ -22,7 +22,7 @@ #define _CLAMFI_H @@ -37,10 +34,9 @@ extern uint64_t maxfilesize; extern int addxvirus; -diff -Nau configure.orig configure Index: configure ---- configure.orig 2009-10-28 16:34:13.000000000 +0100 -+++ configure 2009-11-01 15:29:06.145022137 +0100 +--- configure.orig 2009-10-28 16:34:13 +0100 ++++ configure 2009-11-08 10:27:32 +0100 @@ -16692,9 +16692,6 @@ save_LIBS="$LIBS" @@ -51,22 +47,18 @@ LIBS="$LIBS -lmilter $CLAMAV_MILTER_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mi_stop in -lmilter" >&5 $as_echo_n "checking for mi_stop in -lmilter... " >&6; } -@@ -16842,9 +16839,9 @@ +@@ -16842,7 +16839,7 @@ fi LIBS="$save_LIBS" - for ac_header in libmilter/mfapi.h + for ac_header in milter/mfapi.h do : -- ac_fn_c_check_header_mongrel "$LINENO" "libmilter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" -+ ac_fn_c_check_header_mongrel "$LINENO" "milter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" + ac_fn_c_check_header_mongrel "$LINENO" "libmilter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" if test "x$ac_cv_header_libmilter_mfapi_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBMILTER_MFAPI_H 1 -diff -Nau libclamav/others.c.orig libclamav/others.c Index: libclamav/others.c ---- libclamav/others.c.orig 2009-10-28 16:34:13.000000000 +0100 -+++ libclamav/others.c 2009-11-01 15:26:46.257883269 +0100 +--- libclamav/others.c.orig 2009-10-28 16:34:13 +0100 ++++ libclamav/others.c 2009-11-08 10:27:04 +0100 @@ -177,8 +177,10 @@ if(is_rar_initd) return; is_rar_initd = 1; @@ -78,10 +70,9 @@ return; if (!(cli_unrar_open = (int(*)(int, const char *, unrar_state_t *))lt_dlsym(rhandle, "libclamunrar_iface_LTX_unrar_open")) || -diff -Nau shared/output.c.orig shared/output.c Index: shared/output.c ---- shared/output.c.orig 2009-10-28 16:34:13.000000000 +0100 -+++ shared/output.c 2009-11-01 15:26:46.259056039 +0100 +--- shared/output.c.orig 2009-10-28 16:34:13 +0100 ++++ shared/output.c 2009-11-08 10:27:04 +0100 @@ -67,7 +67,7 @@ pthread_mutex_t logg_mutex = PTHREAD_MUTEX_INITIALIZER; #endif diff -r 3695593c147a -r c6b0e6c7f67d clamav/clamav.spec --- a/clamav/clamav.spec Thu Aug 09 18:53:48 2012 +0200 +++ b/clamav/clamav.spec Thu Aug 09 18:55:01 2012 +0200 @@ -38,8 +38,8 @@ Class: EVAL Group: AntiVirus License: GPL -Version: 0.95.3 -Release: 20091102 +Version: 0.97.5 +Release: 20120800 # package options %option with_milter no @@ -50,18 +50,14 @@ Patch0: clamav.patch # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, bzip2, pkgconfig, bc -PreReq: OpenPKG, openpkg >= 20060823 +BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, bzip2, pkgconfig, bc +PreReq: OpenPKG, openpkg >= 20100101 BuildPreReq: zlib, bzip2, curl, gmp, libiconv, openssl PreReq: zlib, bzip2, curl, gmp, libiconv, openssl %if "%{with_milter}" == "yes" BuildPreReq: milter PreReq: milter %endif -AutoReq: no -AutoReqProv: no %description Clam AntiVirus is an anti-virus toolkit for UNIX. The main @@ -83,6 +79,9 @@ %prep %setup -q %patch -p0 + %{l_shtool} subst \ + -e 's;lib\(milter/mfapi.h\);\1;' \ + configure %build # configure package @@ -93,6 +92,7 @@ GREP="grep" \ ./configure \ --prefix=%{l_prefix} \ + --libdir=%{l_prefix}/lib \ --mandir=%{l_prefix}/man \ --sysconfdir=%{l_prefix}/etc/clamav \ --with-zlib=%{l_prefix} \ @@ -117,10 +117,8 @@ %{l_make} %{l_mflags -O} %install - rm -rf $RPM_BUILD_ROOT - # perform standard package installation - %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" # install default configuration %{l_shtool} mkdir -f -p -m 755 \ @@ -165,13 +163,11 @@ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ '%config %{l_prefix}/etc/clamav/*.conf' \ - '%attr(755,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/clamav' \ - '%attr(755,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/clamav' + '%attr(755,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/clamav' %files -f files %clean - rm -rf $RPM_BUILD_ROOT %pre # before upgrade, save status and stop service