From cb4029f851d0752737d7f34199137b5edaeb0b32ac3b01f0c045a95e3fdaba3f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 7 Oct 2017 10:09:49 +0000 Subject: [PATCH] Accepting request 521576 from home:jengelh:branches:security - Implement shared library guideline. +Change that old %makeinstall to modern %make_install OBS-URL: https://build.opensuse.org/request/show/521576 OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=147 --- clamav.changes | 5 +++++ clamav.spec | 38 +++++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/clamav.changes b/clamav.changes index 1a0660e..57fed5a 100644 --- a/clamav.changes +++ b/clamav.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 5 23:30:39 UTC 2017 - jengelh@inai.de + +- Implement shared library guideline. + ------------------------------------------------------------------- Mon Aug 21 13:41:14 UTC 2017 - fvogt@suse.com diff --git a/clamav.spec b/clamav.spec index 8b50dfe..dd8fbb7 100644 --- a/clamav.spec +++ b/clamav.spec @@ -73,6 +73,26 @@ provides numerous file format detection mechanisms, file unpacking support, archive support, and multiple signature languages for detecting threats. +%package -n libclamav7 +Summary: ClamAV antivirus engine runtime +Group: System/Libraries + +%description -n libclamav7 +ClamAV is an antivirus engine designed for detecting trojans, +viruses, malware and other malicious threats. + +%package devel +Summary: Development files for libclamav, an antivirus engine +Group: Development/Libraries/C and C++ +Requires: libclamav7 = %version + +%description devel +ClamAV is an antivirus engine designed for detecting trojans, +viruses, malware and other malicious threats. + +This subpackage contains header files for developing applications +that want to make use of libclamav. + %prep %setup -q %patch1 -p1 @@ -106,7 +126,7 @@ CFLAGS="$CFLAGS -DFP_64BIT" make V=1 %{?_smp_mflags} %install -%makeinstall +%make_install install -d -m755 %buildroot/var/lib/clamav install -d -m755 %buildroot/%_tmpfilesdir install -m644 %{S:6} %buildroot%_tmpfilesdir/clamav.conf @@ -144,6 +164,9 @@ done VALGRIND_GENSUP=1 make check %endif +%post -n libclamav7 -p /sbin/ldconfig +%postun -n libclamav7 -p /sbin/ldconfig + %files %defattr(-,root,root,-) %config(noreplace) %_sysconfdir/*.conf @@ -157,14 +180,21 @@ VALGRIND_GENSUP=1 make check %doc %_mandir/*/* %_bindir/* %_sbindir/* -%_includedir/* -%_libdir/lib* %_libdir/pkgconfig/libclamav.pc %defattr(-,vscan,vscan) %dir %attr(750,vscan,vscan) /var/spool/amavis %dir /var/lib/clamav %ghost %attr(755,vscan,vscan) /run/clamav +%files -n libclamav7 +%defattr(-,root,root) +%_libdir/libclam*.so.7* + +%files devel +%defattr(-,root,root) +%_libdir/libclam*.so +%_includedir/* + %pre getent group vscan >/dev/null || %_sbindir/groupadd -r vscan || : getent passwd vscan >/dev/null || \ @@ -174,7 +204,6 @@ getent passwd vscan >/dev/null || \ %service_add_pre clamd.service freshclam.service clamav-milter.service %post -/sbin/ldconfig systemd-tmpfiles --create %_tmpfilesdir/clamav.conf %service_add_post clamd.service freshclam.service clamav-milter.service @@ -182,7 +211,6 @@ systemd-tmpfiles --create %_tmpfilesdir/clamav.conf %service_del_preun clamd.service freshclam.service clamav-milter.service %postun -/sbin/ldconfig %service_del_postun clamd.service freshclam.service clamav-milter.service %changelog