diff --git a/clamav-unofficial-sigs.spec b/clamav-unofficial-sigs.spec index 584e80f..5acc86a 100644 --- a/clamav-unofficial-sigs.spec +++ b/clamav-unofficial-sigs.spec @@ -1,16 +1,26 @@ +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +%global with_systemd 1 +%else +%global with_systemd 0 +%endif Name: clamav-unofficial-sigs Version: 5.6.2 Release: 4%{?dist} Summary: Scripts to download unoffical clamav signatures +Group: Applications/System License: BSD URL: https://github.com/extremeshok/%{name} Source0: https://github.com/extremeshok/%{name}/archive/%{version}.tar.gz BuildArch: noarch BuildRequires: bind-utils BuildRequires: rsync +%if %{with_systemd} BuildRequires: systemd +%endif Requires: clamav clamav-update rsync gnupg diffutils curl bind-utils +%if %{with_systemd} Requires(post): systemd-sysv +%endif %description This package contains scripts and configuration files @@ -43,7 +53,7 @@ EOF %build bash clamav-unofficial-sigs.sh -c ./build.conf --install-all -%if 0%{?rhel} == 7 +%if 0%{?rhel} <= 7 sed -i -e '/^#pkg_mgr/ s/^#//;s/""/"yum"/' config/master.conf %else sed -i -e '/^#pkg_mgr/ s/^#//;s/""/"dnf"/' config/master.conf @@ -66,7 +76,11 @@ install -d -p %{buildroot}%{_sysconfdir}/logrotate.d install -d -p %{buildroot}%{_mandir}/man8 install -p -m0755 clamav-unofficial-sigs.sh %{buildroot}%{_sbindir}/clamav-unofficial-sigs.sh # config/os.centos7.conf file is for epel and fedora +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 install -p -m0644 config/os.centos7.conf %{buildroot}%{_sysconfdir}/%{name}/os.conf +%else +install -p -m0644 config/os.centos6.conf %{buildroot}%{_sysconfdir}/%{name}/os.conf +%endif install -p -m0644 config/user.conf %{buildroot}%{_sysconfdir}/%{name}/user.conf install -p -m0644 config/master.conf %{buildroot}%{_sysconfdir}/%{name}/master.conf install -Dp -m 0644 systemd/clamav-unofficial-sigs.service %{buildroot}%{_unitdir}/clamav-unofficial-sigs.service @@ -75,6 +89,9 @@ install -p -m0644 clamav-unofficial-sigs.cron %{buildroot}%{_sysconfdir}/cron.d/ install -p -m0644 clamav-unofficial-sigs.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav-unofficial-sigs install -p -m0644 clamav-unofficial-sigs.8 %{buildroot}%{_mandir}/man8/clamav-unofficial-sigs.8 +%clean +rm -rf %{buildroot} + %files %doc README.md INSTALL %license LICENSE @@ -85,13 +102,18 @@ install -p -m0644 clamav-unofficial-sigs.8 %{buildroot}%{_mandir}/man8/clamav-un %{_sbindir}/clamav-unofficial-sigs.sh %attr(0755,clamupdate,clamupdate) %dir %{_localstatedir}/lib/%{name} %attr(0755,clamupdate,clamupdate) %dir %{_localstatedir}/log/%{name} +%if %{with_systemd} %{_unitdir}/%{name}.service %{_unitdir}/%{name}.timer +%endif %{_sysconfdir}/cron.d/%{name} %{_sysconfdir}/logrotate.d/%{name} %{_mandir}/man*/%{name}* %changelog +* Thu Feb 28 2019 Didier Fabert 5.6.2-4 +- Fix spec for el6 build + * Thu Jan 31 2019 Fedora Release Engineering - 5.6.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild