diff --git a/spamassassin.spec b/spamassassin.spec index 467355b..cb9818c 100644 --- a/spamassassin.spec +++ b/spamassassin.spec @@ -26,6 +26,8 @@ %define option_ssl 0 %define perl_devel 0 %define dkim_deps 0 +%global patricia_deps 0 +%global razor_deps 0 %define require_encode_detect 0 %define use_systemd 0 @@ -53,6 +55,11 @@ %define use_systemd 1 %endif +%if ! 0%{?rhel} +%global patricia_deps 1 +%global razor_deps 1 +%endif + %define real_name Mail-SpamAssassin %{!?perl_vendorlib: %define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)} @@ -63,7 +70,7 @@ Summary: Spam filter for email which can be invoked from mail delivery agents Name: spamassassin Version: 3.4.1 #Release: 0.8.%{prerev}%{?dist} -Release: 24%{?dist} +Release: 25%{?dist} License: ASL 2.0 Group: Applications/Internet URL: http://spamassassin.apache.org/ @@ -116,7 +123,7 @@ Requires: /sbin/chkconfig /sbin/service %endif Requires(post): diffutils -BuildRequires: gcc +BuildRequires: gcc BuildRequires: perl-interpreter >= 2:5.8.0 BuildRequires: perl-generators BuildRequires: perl(Net::DNS) @@ -147,8 +154,12 @@ BuildRequires: perl(Archive::Tar) Requires: perl(Archive::Tar) # Optional requirements that might make things better/faster +%if %{patricia_deps} Requires: perl(Net::Patricia) +%endif +%if %{razor_deps} Requires: perl-Razor-Agent +%endif %if %{option_ssl} # Needed for spamc/spamd SSL @@ -287,7 +298,9 @@ install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/chan install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/channel.d/ install -m 0644 %{SOURCE13} $RPM_BUILD_DIR/Mail-SpamAssassin-%{version}/ +%if %{razor_deps} mkdir -m 0700 -p $RPM_BUILD_ROOT%{_sharedstatedir}/razor/ +%endif %files -f %{name}-%{version}-filelist %doc LICENSE NOTICE CREDITS Changes README TRADEMARK UPGRADE @@ -303,7 +316,9 @@ mkdir -m 0700 -p $RPM_BUILD_ROOT%{_sharedstatedir}/razor/ %config(noreplace) %{_sysconfdir}/sysconfig/sa-update %dir %{_datadir}/spamassassin %dir %{_localstatedir}/lib/spamassassin +%if %{razor_deps} %dir %{_sharedstatedir}/razor +%endif %config(noreplace) %{_sysconfdir}/logrotate.d/sa-update %if %{use_systemd} %{_unitdir}/spamassassin.service @@ -352,7 +367,9 @@ exit 0 %endif %preun +%if %{razor_deps} rm -f %{_sharedstatedir}/razor/* +%endif %if %{use_systemd} == 0 if [ $1 = 0 ] ; then /sbin/service spamassassin stop >/dev/null 2>&1 @@ -376,6 +393,9 @@ exit 0 %endif %changelog +* Mon Jul 23 2018 Jaroslav Škarvada - 3.4.1-25 +- perl-Razor-Agent and perl-Net-Patricia not used on RHEL + * Sat Jul 14 2018 Fedora Release Engineering - 3.4.1-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild