From 0081110cedd7d178d004ceb5b7083fa3c6d82677ddf8cf6daa9d29289d1b53c8 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Fri, 10 Jan 2020 11:07:15 +0000 Subject: [PATCH] Accepting request 762781 from home:lnussel:branches:Documentation - don't use alternatives for man.7, just move it to a different directory (boo#1160568) - use packageand to supplement the documentation pattern instead of unconditionally hooking on man. OBS-URL: https://build.opensuse.org/request/show/762781 OBS-URL: https://build.opensuse.org/package/show/Documentation/man-pages?expand=0&rev=200 --- man-pages.changes | 8 ++++++++ man-pages.spec | 31 +++++++------------------------ 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/man-pages.changes b/man-pages.changes index 46b3352..267e59e 100644 --- a/man-pages.changes +++ b/man-pages.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jan 10 10:42:38 UTC 2020 - Ludwig Nussel + +- don't use alternatives for man.7, just move it to a different directory + (boo#1160568) +- use packageand to supplement the documentation pattern instead of + unconditionally hooking on man. + ------------------------------------------------------------------- Wed Dec 4 22:09:23 CET 2019 - Matej Cepl diff --git a/man-pages.spec b/man-pages.spec index 3daf754..2cd2525 100644 --- a/man-pages.spec +++ b/man-pages.spec @@ -1,7 +1,7 @@ # # spec file for package man-pages # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,10 +33,7 @@ Patch5: %{name}-tty_ioctl.patch # [bsc#1154701] Patch6: man-pages-tcp_fack.patch BuildRequires: fdupes -BuildRequires: update-alternatives -Requires(post): update-alternatives -Requires(postun): update-alternatives -Supplements: man +Supplements: packageand(man:patterns-base-documentation) BuildArch: noarch %description @@ -66,9 +63,12 @@ rm man2/ioctl_list.2 rm man3/{getifaddrs.3,freeifaddrs.3,crypt.3,crypt_r.3} # remove .so link to bzero.3, conflicts with libbsd rm man3/explicit_bzero.3 +# conflicts with mandoc +mkdir man7mp +mv man7/man.7 man7mp/man.7mp %install -for i in man? ; do +for i in man[0-9]*; do mkdir -p "%{buildroot}/%{_mandir}/$i" cp -p "$i"/* "%{buildroot}/%{_mandir}/$i/" done @@ -93,30 +93,13 @@ if [ "$RETVAL" -ne 0 ] ; then exit "$RETVAL" fi -# Prepare alternatives -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -from=$(readlink -f %{buildroot}%{_mandir}/man7/man.7*) -to=$(echo $from|sed -e 's!\.7$!!')-mp.7 -mv -v "$from" "$to" -ln -s -f %{_sysconfdir}/alternatives/man.7 "$from" - # Remove duplicates %fdupes -s %{buildroot}/%{_prefix} -%post -update-alternatives --install \ - %{_mandir}/man7/man.7%{?ext_man} man.7%{?ext_man} \ - %{_mandir}/man7/man-mp.7%{?ext_man} 500 - -%preun -if [ $1 -eq 0 ] ; then - update-alternatives --remove man.7%{?ext_man} %{_mandir}/man7/man-mp.7%{?ext_man} -fi - %files %defattr(644,root,root,755) +%dir %{_mandir}/man7mp %{_mandir}/man*/*.gz -%ghost %{_sysconfdir}/alternatives/man.7%{?ext_man} %doc README Changes Changes.old %doc man-pages-*.Announce %doc man-pages-*.lsm