spax: incorporate update-alternatives for pax

Version: 1.5.2-2
Resolves: #960007
This commit is contained in:
Pavel Raiskup 2013-05-06 15:43:16 +02:00
parent 59a70f9014
commit b86011d975
1 changed files with 28 additions and 0 deletions

View File

@ -1,6 +1,9 @@
%if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1} %if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
%global WITH_SELINUX 1 %global WITH_SELINUX 1
%endif %endif
%global ALTERNATIVES %{_sbindir}/alternatives
Summary: An archiving tool with ACL support Summary: An archiving tool with ACL support
Name: star Name: star
Version: 1.5.2 Version: 1.5.2
@ -35,6 +38,9 @@ Patch8: star-1.5.2-man-page-day.patch
# ~> #926571 # ~> #926571
Patch9: star-1.5.2-aarch64-config.patch Patch9: star-1.5.2-aarch64-config.patch
Requires(post): %{ALTERNATIVES}
Requires(preun): %{ALTERNATIVES}
License: CDDL License: CDDL
Group: Applications/Archiving Group: Applications/Archiving
BuildRequires: libattr-devel libacl-devel libtool libselinux-devel BuildRequires: libattr-devel libacl-devel libtool libselinux-devel
@ -61,6 +67,16 @@ The scpio utility, depending on the options used: copies files to an archive
file, extracts files from an archive file, lists files from an archive file or file, extracts files from an archive file, lists files from an archive file or
copies files from one directory tree to another. copies files from one directory tree to another.
# "desired" alternative constants
%global ALT_NAME pax
%global ALT_LINK %{_bindir}/pax
%global ALT_SL1_NAME pax-man
%global ALT_SL1_LINK %{_mandir}/man1/pax.1.gz
# "local" alternative constants ("opax" - OpenBSD pax)
%global ALT_PATH %{_bindir}/spax
%global ALT_SL1_PATH %{_mandir}/man1/spax.1.gz
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .newMake %patch1 -p1 -b .newMake
@ -145,6 +161,17 @@ ln -s star.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/ustar.1
%global general_docs README AN* COPYING CDDL.Schily.txt TODO README.linux %global general_docs README AN* COPYING CDDL.Schily.txt TODO README.linux
%post -n spax
%{ALTERNATIVES} \
--install %{ALT_LINK} %{ALT_NAME} %{ALT_PATH} 66 \
--slave %{ALT_SL1_LINK} %{ALT_SL1_NAME} %{ALT_SL1_PATH}
%preun -n spax
if [ $1 -eq 0 ]; then
# only on pure uninstall (not upgrade)
%{ALTERNATIVES} --remove %{ALT_NAME} %{ALT_PATH}
fi
%files %files
%doc %{general_docs} %doc %{general_docs}
%{_bindir}/star %{_bindir}/star
@ -167,6 +194,7 @@ ln -s star.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/ustar.1
* Mon May 06 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-2 * Mon May 06 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-2
- package spax and scpio separately (#959917) - package spax and scpio separately (#959917)
- fedora-review fixes, unapplied patch - fedora-review fixes, unapplied patch
- make the spax to be pax alternative (#960007)
* Wed Apr 10 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-1 * Wed Apr 10 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-1
- rebase to most up2date upstream tarball, remove patches already upstream, fix - rebase to most up2date upstream tarball, remove patches already upstream, fix