1399246 - ship /usr/bin/spfquery and /usr/bin/spfd as alternatives.

This commit is contained in:
Jan Pazdziora 2017-05-30 10:00:52 +02:00
parent de4e02fbc6
commit 04c35bb03a

View File

@ -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 <jpazdziora@redhat.com> - 2.9.0-12
- 1399246 - ship /usr/bin/spfquery and /usr/bin/spfd as alternatives.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild