diff --git a/clamav-0.99-private.patch b/clamav-private.patch similarity index 64% rename from clamav-0.99-private.patch rename to clamav-private.patch index 7f9f563..41dd4c5 100644 --- a/clamav-0.99-private.patch +++ b/clamav-private.patch @@ -8,8 +8,17 @@ +Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@ Cflags: -I${includedir} ---- clamav-0.99/clamav-config.in 2015-05-28 23:56:25.000000000 +0200 -+++ clamav-0.99/clamav-config.in.private 2015-12-02 01:31:34.933705763 +0100 +diff -up clamav-1.0.0/clamav-config.in.private clamav-1.0.0/clamav-config.in +--- clamav-1.0.0/clamav-config.in.private 2023-01-22 17:40:01.711757908 -0700 ++++ clamav-1.0.0/clamav-config.in 2023-01-22 18:01:06.188743168 -0700 +@@ -4,7 +4,6 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + includedir=@includedir@ +-libdir=@libdir@ + + usage() + { @@ -54,12 +54,8 @@ usage 0 ;; diff --git a/clamav-types.h b/clamav-types.h new file mode 100644 index 0000000..ffa83b7 --- /dev/null +++ b/clamav-types.h @@ -0,0 +1,14 @@ +#ifndef CLAMAV_TYPES_H_MULTILIB +#define CLAMAV_TYPES_H_MULTILIB + +#include + +#if __WORDSIZE == 32 +# include "clamav-types-32.h" +#elif __WORDSIZE == 64 +# include "clamav-types-64.h" +#else +# error "unexpected value for __WORDSIZE macro" +#endif + +#endif diff --git a/clamav.spec b/clamav.spec index 7b9f6b9..8f24f73 100644 --- a/clamav.spec +++ b/clamav.spec @@ -25,7 +25,7 @@ Summary: End-user tools for the Clam Antivirus scanner Name: clamav Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} URL: https://www.clamav.net/ %if %{with unrar} @@ -37,6 +37,8 @@ Source999: https://www.clamav.net/downloads/production/%{name}-%{version}%{?pre # tarball was created with update_clamav.sh Source0: %{name}-%{version}%{?prerelease}-norar.tar.xz %endif +# Multilib headers +Source1: clamav-types.h #for server Source3: clamd.logrotate Source5: clamd-README @@ -65,7 +67,7 @@ Source530: clamd@.service # Change default config locations for Fedora Patch1: clamav-default_confs.patch # Fix pkg-config flags for static linking, multilib -Patch2: clamav-0.99-private.patch +Patch2: clamav-private.patch # Remove rpath Patch3: clamav-rpath.patch # Modify clamav-clamonacc.service for Fedora compatibility @@ -362,6 +364,16 @@ cat << EOF > %{buildroot}%{_tmpfilesdir}/clamav-milter.conf d %{_rundir}/clamav-milter 0710 %{milteruser} %{milteruser} EOF +#Fixup headers and scripts for multilib +%if 0%{?__isa_bits} == 64 +mv %{buildroot}%{_includedir}/clamav-types.h \ + %{buildroot}%{_includedir}/clamav-types-64.h +%else +mv %{buildroot}%{_includedir}/clamav-types.h \ + %{buildroot}%{_includedir}/clamav-types-32.h +%endif +install -m 0644 %SOURCE1 %{buildroot}%{_includedir}/clamav-types.h + # TODO: Evaluate using upstream's unit with clamav-daemon.socket rm %{buildroot}%{_unitdir}/clamav-daemon.* @@ -537,6 +549,9 @@ exit 0 %changelog +* Mon Jan 23 2023 Orion Poplawski - 1.0.0-2 +- Fix multilib install + * Sun Jan 22 2023 Orion Poplawski - 1.0.0-1 - Update to 1.0.0