diff --git a/star.spec b/star.spec index b49726af7d17fc877be312468761afc08db8780b..847296fb802f530fcf4c49f9ba5502df9256a641 100644 --- a/star.spec +++ b/star.spec @@ -1,11 +1,4 @@ -%define anolis_release 1 -%global ALTERNATIVES %{_sbindir}/alternatives -%global ALT_NAME pax -%global ALT_LINK %{_bindir}/pax -%global ALT_SL1_NAME pax-man -%global ALT_SL1_LINK %{_mandir}/man1/pax.1.gz -%global ALT_PATH %{_bindir}/spax -%global ALT_SL1_PATH %{_mandir}/man1/spax.1.gz +%define anolis_release 2 Name: star Version: 1.6 @@ -13,7 +6,7 @@ Release: %{anolis_release}%{?dist} Summary: An archiving tool with ACL support License: CDDL -URL: http://freecode.com/projects/star +URL: https://sourceforge.net/projects/s-tar/ Source0: https://downloads.sourceforge.net/s-tar/%{name}-%{version}.tar.bz2 Patch0: 0000-star-1.6-star-mk.patch Patch1: 0001-star-1.5.2-bufferoverflow.patch @@ -30,8 +23,8 @@ and can restore individual files from the archive. Star supports ACL. %package -n spax Summary: Portable archive exchange -Requires(post): %{ALTERNATIVES} -Requires(preun): %{ALTERNATIVES} +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives %description -n spax The pax utility shall read and write archives, write lists of the members of @@ -95,7 +88,7 @@ make %make_flags %install make install -s %make_flags -ln -s star.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/ustar.1 +ln -s star.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ustar.1 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir} mkdir -p ${RPM_BUILD_ROOT}%{_pkgdocdir} ln -s %{_sbindir}/rmt ${RPM_BUILD_ROOT}%{_sysconfdir}/rmt @@ -130,14 +123,14 @@ install -p -m 644 COPYING star/README CDDL.Schily.txt AN-* \ %doc %{_pkgdocdir}/CDDL.Schily.txt \ %post -n spax -%{ALTERNATIVES} \ - --install %{ALT_LINK} %{ALT_NAME} %{ALT_PATH} 66 \ - --slave %{ALT_SL1_LINK} %{ALT_SL1_NAME} %{ALT_SL1_PATH} +%{_sbindir}/update-alternatives \ + --install %{_bindir}/pax pax %{_bindir}/spax 66 \ + --slave %{_mandir}/man1/pax.1%{_extension} pax.1%{_extension} %{_mandir}/man1/spax.1%{_extension} %preun -n spax if [ $1 -eq 0 ]; then # only on pure uninstall (not upgrade) - %{ALTERNATIVES} --remove %{ALT_NAME} %{ALT_PATH} + %{_sbindir}/update-alternatives --remove pax %{_bindir}/spax fi %files @@ -162,8 +155,8 @@ fi %doc %{_pkgdocdir}/CDDL.Schily.txt %doc %{_mandir}/man1/spax.1* %{_bindir}/spax -%ghost %verify(not md5 size mode mtime) %{ALT_LINK} -%ghost %verify(not md5 size mode mtime) %{ALT_SL1_LINK} +%ghost %verify(not md5 size mode mtime) %{_bindir}/pax +%ghost %verify(not md5 size mode mtime) %{_mandir}/man1/pax.1%{_extension} %files -n rmt %dir %{_pkgdocdir} @@ -175,5 +168,8 @@ fi %{_sysconfdir}/rmt %changelog +* Mon Jan 16 2023 Funda Wang - 1.6-2 +- Use man page extesion macro defined in new system-rpm-config + * Tue Apr 19 2022 happy_orange - 1.6-1 - Init package from upstream