Fix typo in postun scriptlet

Also cleanup usage of RPM internal macro.

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-04-16 08:11:33 +02:00
parent d81c8e88d9
commit 33b28e023d
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

View File

@ -7,7 +7,7 @@
Summary: Linux kernel and C library user-space interface documentation
Name: man-pages
Version: 5.06
Release: 1%{?dist}
Release: 2%{?dist}
License: GPL+ and GPLv2+ and BSD and MIT and Copyright only and IEEE
URL: http://www.kernel.org/doc/man-pages/
Source: http://www.kernel.org/pub/linux/docs/man-pages/man-pages-%{version}.tar.xz
@ -55,24 +55,24 @@ A large collection of manual pages from the Linux Documentation Project (LDP).
%patch22 -p1
# rename posix README so we don't have conflict
%{__mv} %{posix_name}/README %{posix_name}/%{posix_name}.README
mv %{posix_name}/README %{posix_name}/%{posix_name}.README
## Remove man pages we are not going to use ##
# deprecated
%{__rm} man2/pciconfig_{write,read,iobase}.2
rm man2/pciconfig_{write,read,iobase}.2
# problem with db x db4 (#198597) - man pages are obsolete
%{__rm} man3/{db,btree,dbopen,hash,mpool,recno}.3
rm man3/{db,btree,dbopen,hash,mpool,recno}.3
# we are not using SystemV anymore
%{__rm} man7/boot.7
rm man7/boot.7
# we do not have sccs (#203302)
%{__rm} %{posix_name}/man1p/{admin,delta,get,prs,rmdel,sact,sccs,unget,val,what}.1p
rm %{posix_name}/man1p/{admin,delta,get,prs,rmdel,sact,sccs,unget,val,what}.1p
# remove man pages deprecated by libxcrypt (#1610307)
%{__rm} man3/crypt{,_r}.3
rm man3/crypt{,_r}.3
%build
# nothing to build
@ -92,7 +92,7 @@ touch %{buildroot}%{_mandir}/man7/man.7
%pre
# remove alternativized files if they are not symlinks
[ -L %{_mandir}/man7/man.7.gz ] || %{__rm} -f %{_mandir}/man7/man.7.gz >/dev/null 2>&1 || :
[ -L %{_mandir}/man7/man.7.gz ] || rm -f %{_mandir}/man7/man.7.gz >/dev/null 2>&1 || :
%post
# set up the alternatives files
@ -106,7 +106,7 @@ fi
%postun
if [ $1 -ge 1 ]; then
if [ "$(+readlink %{_sysconfdir}/alternatives/man.7.gz+)" == "%{_mandir}/man7/man.%{name}.7.gz" ]; then
if [ "$(readlink %{_sysconfdir}/alternatives/man.7.gz+)" == "%{_mandir}/man7/man.%{name}.7.gz" ]; then
%{_sbindir}/update-alternatives --set man.7.gz %{_mandir}/man7/man.%{name}.7.gz >/dev/null 2>&1 || :
fi
fi
@ -118,6 +118,9 @@ fi
%{_mandir}/man*/*
%changelog
* Thu Apr 16 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 5.06-2
- Fix typo in postun scriptlet
* Tue Apr 14 2020 Nikola Forró <nforro@redhat.com> - 5.06-1
- update to 5.06
resolves: #1823161