]> git.pld-linux.org Git - packages/apache-mod_clamav.git/blobdiff - apache-mod_clamav.spec
- fix building with gcc 10+, rel 5
[packages/apache-mod_clamav.git] / apache-mod_clamav.spec
index b20ddaa9f75e61ed3e135d8596c78bcb76b8cdda..a1986a5b0bc31c520bb0da0db18f21c07ab57db5 100644 (file)
@@ -1,27 +1,27 @@
-# TODO
-# - fix build with new apache/apr (apr_off_t)
-%define        apxs            /usr/sbin/apxs
+%define                apxs            /usr/sbin/apxs
 %define                mod_name        clamav
 Summary:       An Apache virus scanning filter
 Summary(pl.UTF-8):     Filtr skanera antywirusowego dla Apache'a
 Name:          apache-mod_%{mod_name}
-Version:       0.21
-Release:       0.1
-License:       GPL
-Group:         Networking/Daemons
+Version:       0.23
+Release:       5
+License:       GPL v2
+Group:         Networking/Daemons/HTTP
 Source0:       http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz
-# Source0-md5: 98bd0d8628be8ddeae21da6623e57d20
+# Source0-md5: 32c7b285dfdff5d13371b92ebe73b352
 Source1:       %{name}.conf
-Patch0:                %{name}-libtool-tag.patch
+Patch0:                %{name}-clamav.patch
+Patch1:                gcc10.patch
 URL:           http://software.othello.ch/mod_clamav/
 BuildRequires: %{apxs}
 BuildRequires: apache-devel >= 2.0
 BuildRequires: apr-devel >= 1:1.0
 BuildRequires: apr-util-devel >= 1:1.0
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.12
 BuildRequires: automake
 BuildRequires: clamav-devel
 BuildRequires: libtool
+BuildRequires: pkgconfig
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires:      apache(modules-api) = %apache_modules_api
 Requires:      apache-mod_proxy
@@ -29,7 +29,7 @@ Requires:     clamav
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
-%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
 
 %description
 mod_clamav is an Apache 2 filter which scans the content delivered by
@@ -43,25 +43,25 @@ skanera antywirusowego Clamav.
 
 %prep
 %setup -q -n mod_%{mod_name}-%{version}
-%patch0 -p0
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__automake}
-
-CPPFLAGS="-I `/usr/bin/apr-1-config --includedir` -I `/usr/bin/apu-1-config --includedir`"
+CPPFLAGS="-I$(/usr/bin/apr-1-config --includedir) -I$(/usr/bin/apu-1-config --includedir) $(pkg-config --cflags libclamav)"
 %configure \
        --with-apxs=%{apxs}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
 
 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/32_mod_clamav.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/32_mod_clamav.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -77,5 +77,5 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog mod_clamav.html NEWS README TODO
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
-%attr(755,root,root) %{_pkglibdir}/*.so
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_clamav.conf
+%attr(755,root,root) %{_pkglibdir}/mod_clamav.so
This page took 0.101749 seconds and 4 git commands to generate.