From 04c35bb03a53ec35c1bb6fdc0cd082526efd3d65 Mon Sep 17 00:00:00 2001
From: Jan Pazdziora <[email protected]>
Date: Tue, 30 May 2017 10:00:52 +0200
Subject: 1399246 - ship /usr/bin/spfquery and /usr/bin/spfd as alternatives.
---
perl-Mail-SPF.spec | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/perl-Mail-SPF.spec b/perl-Mail-SPF.spec
index a5b282e..8448849 100644
--- a/perl-Mail-SPF.spec
+++ b/perl-Mail-SPF.spec
@@ -1,6 +1,6 @@
Name: perl-Mail-SPF
Version: 2.9.0
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: Object-oriented implementation of Sender Policy Framework
License: BSD
URL: http://search.cpan.org/dist/Mail-SPF/
@@ -39,6 +39,9 @@ Requires: perl(:MODULE_COMPAT_%(eval "$(perl
-V:version)"; echo $version))
Requires: perl(Net::DNS) >= 0.62
Requires: perl(URI) >= 1.13
+Requires(post): %{_sbindir}/update-alternatives
+Requires(postun): %{_sbindir}/update-alternatives
+
%description
Mail::SPF is an object-oriented implementation of Sender Policy Framework
(SPF). See http://www.openspf.org for more information about SPF.
@@ -58,20 +61,37 @@ perl Build.PL installdirs=vendor
%install
./Build install destdir=%{buildroot} create_packlist=0
%{_fixperms} %{buildroot}/*
-# Don't include the spfd and spfquery scripts in _bindir.
-rm -f %{buildroot}%{_bindir}/spfquery %{buildroot}%{_sbindir}/spfd
-rm -rf %{buildroot}%{_mandir}/man1
+# The spfquery and spfd will use alternatives
+%{__mv} -f %{buildroot}%{_bindir}/spfquery
%{buildroot}%{_bindir}/spfquery.%{name}
+%{__mv} -f %{buildroot}%{_sbindir}/spfd %{buildroot}%{_bindir}/spfd.%{name}
+touch %{buildroot}%{_bindir}/spfquery %{buildroot}%{_bindir}/spfd
%check
./Build test
+%post
+%{_sbindir}/update-alternatives --install %{_bindir}/spfquery spf
%{_bindir}/spfquery.%{name} 10 \
+ --slave %{_bindir}/spfd spf-daemon %{_bindir}/spfd.%{name}
+
+%postun
+if [ $1 -eq 0 ] ; then
+ %{_sbindir}/update-alternatives --remove spf %{_bindir}/spfquery.%{name}
+fi
+
%files
%license LICENSE
%doc CHANGES README TODO bin/ sbin/
%{perl_vendorlib}/*
%{_mandir}/man3/*
+%ghost %{_bindir}/spfquery
+%ghost %{_bindir}/spfd
+%{_bindir}/spfquery.%{name}
+%{_bindir}/spfd.%{name}
%changelog
+* Sun Feb 12 2017 Jan Pazdziora <[email protected]> - 2.9.0-12
+- 1399246 - ship /usr/bin/spfquery and /usr/bin/spfd as alternatives.
+
* Sat Feb 11 2017 Fedora Release Engineering <[email protected]> -
2.9.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-Mail-SPF.git/commit/?h=f26&id=04c35bb03a53ec35c1bb6fdc0cd082526efd3d65
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]