-diff -ur clamav-0.98.orig/configure.ac clamav-0.98/configure.ac
---- clamav-0.98.orig/configure.ac 2013-09-21 10:56:27.087891623 +0000
-+++ clamav-0.98/configure.ac 2013-09-21 11:01:02.996891571 +0000
-@@ -54,6 +54,8 @@
- AC_PROG_INSTALL
- AC_PROG_LN_S
- AC_PROG_MAKE_SET
-+AM_PROG_AR
-+AM_PROG_CC_C_O
+diff -uNr clamav-0.98.3/configure.ac clamav-0.98.3-ac2.68/configure.ac
+--- clamav-0.98.3/configure.ac 2014-05-06 20:42:41.000000000 +0200
++++ clamav-0.98.3-ac2.68/configure.ac 2014-05-09 10:51:30.508280355 +0200
+@@ -42,12 +42,12 @@
+ AC_DEFINE([PACKAGE], PACKAGE_NAME, [Name of package])
+
+ m4_include([m4/reorganization/version.m4])
++m4_include([m4/reorganization/build_tools.m4])
LT_CONFIG_LTDL_DIR([libltdl])
LT_INIT([dlopen disable-static])
-@@ -469,7 +471,7 @@
+ LTDL_INIT([recursive])
- if test "$enable_check_ut" != "no" ; then
- AC_LIB_FIND([check],[check.h],
-- AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)]),
-+ [AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)])],
- [CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK"],
- [])
- fi
-@@ -1548,8 +1550,8 @@
+-m4_include([m4/reorganization/build_tools.m4])
+ m4_include([m4/reorganization/headers.m4])
+
+ AC_CONFIG_FILES([libltdl/Makefile])
+diff -uNr clamav-0.98.3/m4/reorganization/build_tools.m4 clamav-0.98.3-ac2.68/m4/reorganization/build_tools.m4
+--- clamav-0.98.3/m4/reorganization/build_tools.m4 2014-05-06 20:39:56.000000000 +0200
++++ clamav-0.98.3-ac2.68/m4/reorganization/build_tools.m4 2014-05-09 10:53:30.800262620 +0200
+@@ -1,3 +1,5 @@
++AM_PROG_AR
+ AC_PROG_CC
++AM_PROG_CC_C_O
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+diff -uNr clamav-0.98.3/m4/reorganization/clamdtop.m4 clamav-0.98.3-ac2.68/m4/reorganization/clamdtop.m4
+--- clamav-0.98.3/m4/reorganization/clamdtop.m4 2014-05-06 20:39:56.000000000 +0200
++++ clamav-0.98.3-ac2.68/m4/reorganization/clamdtop.m4 2014-05-09 10:51:06.963907781 +0200
+@@ -6,8 +6,8 @@
if test "$enable_clamdtop" != "no"; then
AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
[CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
CURSES_INCLUDE="<ncurses/ncurses.h>"],
[])
-@@ -1557,8 +1559,8 @@
+@@ -15,8 +15,8 @@
if test "X$HAVE_LIBNCURSES" != "Xyes"; then
HAVE_LIBNCURSES=
AC_LIB_FIND([ncurses], [ncurses.h],
[CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
CURSES_INCLUDE="<ncurses.h>"],
[])
-@@ -1566,8 +1568,8 @@
+@@ -24,8 +24,8 @@
if test "X$HAVE_LIBNCURSES" != "Xyes"; then
AC_LIB_FIND([pdcurses],[curses.h],
[CURSES_CPPFLAGS="$INCPDCURSES";
CURSES_LIBS="$LTLIBPDCURSES";
CURSES_INCLUDE="<curses.h>"],
+diff -uNr clamav-0.98.3/m4/reorganization/code_checks/unit_tests.m4 clamav-0.98.3-ac2.68/m4/reorganization/code_checks/unit_tests.m4
+--- clamav-0.98.3/m4/reorganization/code_checks/unit_tests.m4 2014-05-06 20:39:56.000000000 +0200
++++ clamav-0.98.3-ac2.68/m4/reorganization/code_checks/unit_tests.m4 2014-05-09 10:51:06.963907781 +0200
+@@ -12,7 +12,7 @@
+ esac
+
+ AC_LIB_FIND([check],[check.h],
+- AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)]),
++ [AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)])],
+ [CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK $LDFLAGS"],
+ [])
+
+++ /dev/null
-diff -ur clamav-0.98.orig/configure.ac clamav-0.98/configure.ac
---- clamav-0.98.orig/configure.ac 2013-09-21 10:55:23.897891162 +0000
-+++ clamav-0.98/configure.ac 2013-09-21 10:55:51.287891575 +0000
-@@ -34,8 +34,7 @@
-
- dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings
- dnl enable stealth builds and psychedelic tests
--AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override -Werror std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar])
--AM_SILENT_RULES([yes])
-+AM_INIT_AUTOMAKE([1.10 -Wall -Wportability -Wno-override -Werror std-options foreign dist-bzip2 no-define tar-ustar])
-
- dnl we told automake to not define these, since we want to include
- dnl the date in the version
-diff -ur clamav-0.98.orig/m4/acinclude.m4 clamav-0.98/m4/acinclude.m4
---- clamav-0.98.orig/m4/acinclude.m4 2013-09-16 19:28:14.000000000 +0000
-+++ clamav-0.98/m4/acinclude.m4 2013-09-21 10:55:51.287891575 +0000
-@@ -880,9 +880,9 @@
- AC_DEFUN([CL_MSG_STATUS],
- [
- m4_if($#,3,,[m4_fatal([$0: invalid number of arguments: $#])])
-- AS_ECHO_N([" $1: "])
-- AS_IF([test "x$3" = "xno"], [AS_ECHO(["$2 (disabled)"])],
-- [test "x$3" = "xyes"], [AS_ECHO(["$2"])],
-- [test "x$3" = "x"], [AS_ECHO(["$2"])],
-- [AS_ECHO(["$2 ($3)"])])
-+ echo [" $1: "]
-+ AS_IF([test "x$3" = "xno"], [echo ["$2 (disabled)"]],
-+ [test "x$3" = "xyes"], [echo ["$2"]],
-+ [test "x$3" = "x"], [echo ["$2"]],
-+ [echo ["$2 ($3)"]])
- ])
--- /dev/null
+--- clamav-0.98.3/m4/reorganization/version.m4~ 2014-05-06 20:59:19.000000000 +0200
++++ clamav-0.98.3/m4/reorganization/version.m4 2014-05-14 20:33:00.181291208 +0200
+@@ -8,10 +8,11 @@
+ LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
+ AC_SUBST([LIBCLAMAV_VERSION])
+
+-AC_DEFINE_UNQUOTED([LIBCLAMAV_FULLVER], "$major.$LC_AGE.$LC_REVISION",
++MAJOR_VER=$(( $LC_CURRENT - $LC_AGE ))
++AC_DEFINE_UNQUOTED([LIBCLAMAV_FULLVER], "$MAJOR_VER.$LC_AGE.$LC_REVISION",
+ ["Full library version number"])
+
+-AC_DEFINE_UNQUOTED([LIBCLAMAV_MAJORVER], $major, ["Major library version number"])
++AC_DEFINE_UNQUOTED([LIBCLAMAV_MAJORVER], $MAJOR_VER, ["Major library version number"])
+
+ AC_DEFINE_UNQUOTED([VERSION],"$VERSION",[Version number of package])
+ AC_DEFINE_UNQUOTED([VERSION_SUFFIX],"$VERSION_SUFFIX",[Version suffix for package])
-diff -ur clamav-0.98.orig/configure.ac clamav-0.98/configure.ac
---- clamav-0.98.orig/configure.ac 2013-09-16 19:28:14.000000000 +0000
-+++ clamav-0.98/configure.ac 2013-09-21 10:54:26.398891553 +0000
-@@ -430,8 +430,12 @@
- AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args])
-
+diff -uNr clamav-0.98.3/m4/reorganization/code_checks/functions.m4 clamav-0.98.3.nolibs/m4/reorganization/code_checks/functions.m4
+--- clamav-0.98.3/m4/reorganization/code_checks/functions.m4 2014-05-06 20:39:56.000000000 +0200
++++ clamav-0.98.3.nolibs/m4/reorganization/code_checks/functions.m4 2014-05-09 10:38:20.376934561 +0200
+@@ -1,6 +1,10 @@
AX_CHECK_UNAME_SYSCALL
+AC_CHECK_FUNC(socket,, [
AC_CHECK_LIB([socket], [bind], [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"])
--- /dev/null
+diff -uNr clamav-0.98.3/m4/reorganization/libs/openssl.m4 clamav-0.98.3-openssl/m4/reorganization/libs/openssl.m4
+--- clamav-0.98.3/m4/reorganization/libs/openssl.m4 2014-05-06 20:39:56.000000000 +0200
++++ clamav-0.98.3-openssl/m4/reorganization/libs/openssl.m4 2014-05-09 13:51:47.581181238 +0200
+@@ -22,12 +22,12 @@
+ AC_MSG_ERROR([OpenSSL not found.])
+ fi
+
+-SSL_LDFLAGS="-L$LIBSSL_HOME/lib"
++SSL_LDFLAGS=""
+ SSL_LIBS="-lssl -lcrypto"
+ SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
+
+ save_LDFLAGS="$LDFLAGS"
+-LDFLAGS="-L$LIBSSL_HOME/lib $SSL_LIBS"
++LDFLAGS="$SSL_LDFLAGS $SSL_LIBS"
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$SSL_CPPFLAGS"
# - restart amavis in triggers if group membership was modified?
#
# Conditional build:
-%bcond_without milter # build without milter subpackage
-%bcond_without llvm # build without llvm support
+%bcond_without milter # milter interface subpackage
+%bcond_without llvm # LLVM support
Summary: An anti-virus utility for Unix
Summary(pl.UTF-8): Narzędzie antywirusowe dla Uniksów
Name: clamav
-Version: 0.98.1
+Version: 0.98.3
Release: 1
License: GPL v2+
Group: Daemons
Source0: http://downloads.sourceforge.net/clamav/%{name}-%{version}.tar.gz
-# Source0-md5: b1ec7b19dea8385954515ef1d63576d8
+# Source0-md5: b649d35ee85d4d6075a98173dd255c17
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}-milter.init
Source11: clamd.service
Patch0: %{name}-config.patch
Patch1: %{name}-nolibs.patch
-Patch2: am-nosilentrules.patch
-Patch3: ac2.68.patch
+Patch2: ac2.68.patch
+Patch3: %{name}-openssl.patch
+Patch4: %{name}-major.patch
URL: http://www.clamav.net/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bzip2-devel
+BuildRequires: curl-devel
BuildRequires: gmp-devel
BuildRequires: libltdl-devel
%{?with_milter:BuildRequires: libmilter-devel}
%{?with_milter:BuildRequires: libwrap-devel}
%{?with_llvm:BuildRequires: llvm-devel}
BuildRequires: ncurses-devel
+BuildRequires: openssl-devel
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpmbuild(macros) >= 1.647
BuildRequires: zlib-devel
Requires: /usr/sbin/usermod
Requires: rc-scripts >= 0.4.1.23
Suggests: clamav-database
+Suggests: crondaemon
Provides: group(clamav)
Provides: user(clamav)
Conflicts: logrotate < 3.7-4
Group: Development/Libraries
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: bzip2-devel
+Requires: curl-devel
Requires: gmp-devel
+Requires: openssl-devel
Requires: zlib-devel
%description devel
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
-# automake 1.12+ needs configure.ac not .in
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
+ --disable-silent-rules \
--disable-clamav \
+ --enable-clamdtop \
%{?with_milter:--enable-milter} \
--with-dbdir=/var/lib/%{name} \
--with-no-cache \
%endif
cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/clamd
install -p %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/clamav-cron-updatedb
-cp -p etc/clamav-milter.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/clamav-milter.conf
-cp -p etc/clamd.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/clamd.conf
-cp -p etc/freshclam.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/freshclam.conf
+for i in $RPM_BUILD_ROOT%{_sysconfdir}/*.conf.sample; do
+ mv $i ${i%%.sample}
+done
cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
install -p %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}
-install %{SOURCE10} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+cp -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
-install %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
# NOTE: clamd uses sane rights to it's clamd.pid file
# So better keep it dir
%attr(755,root,root) %{_bindir}/clamdscan
%attr(755,root,root) %{_bindir}/clamdtop
%attr(755,root,root) %{_bindir}/clamscan
+%attr(755,root,root) %{_bindir}/clamsubmit
%attr(755,root,root) %{_bindir}/freshclam
%attr(755,root,root) %{_bindir}/sigtool
%attr(755,root,root) %{_bindir}/clamconf
%files libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%attr(755,root,root) %{_libdir}/libclamav.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libclamav.so.6
+%attr(755,root,root) %{_libdir}/libclamunrar.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libclamunrar.so.6
+%attr(755,root,root) %{_libdir}/libclamunrar_iface.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libclamunrar_iface.so.6
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/clamav-config
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
-%{_includedir}/*.h
-%{_pkgconfigdir}/*.pc
+%attr(755,root,root) %{_libdir}/libclamav.so
+%attr(755,root,root) %{_libdir}/libclamunrar.so
+%attr(755,root,root) %{_libdir}/libclamunrar_iface.so
+%{_libdir}/libclamav.la
+%{_libdir}/libclamunrar.la
+%{_libdir}/libclamunrar_iface.la
+%{_includedir}/clamav.h
+%{_pkgconfigdir}/libclamav.pc
%files static
%defattr(644,root,root,755)
-%{_libdir}/*.a
+%{_libdir}/libclamav.a
+%{_libdir}/libclamunrar.a
+%{_libdir}/libclamunrar_iface.a