specfile: another refactoring done - 2nd pass

* indentation fixed
  * added addtional symlinks to */awk folders
  * %make_install macro is used now
This commit is contained in:
David Kaspar [Dee'Kej] 2016-09-11 13:54:24 +02:00
parent 99bfcca075
commit 7b5eea9e86

View File

@ -15,7 +15,7 @@ Release: 7%{?dist}
# #
# UPDATE: Upstream has confirmed that the licenses used here are correct: # UPDATE: Upstream has confirmed that the licenses used here are correct:
# http://lists.gnu.org/archive/html/bug-gawk/2016-09/msg00008.html # http://lists.gnu.org/archive/html/bug-gawk/2016-09/msg00008.html
License: GPLv3+ and GPLv2+ and LGPLv2+ and BSD License: GPLv3+ and GPLv2+ and LGPLv2+ and BSD
URL: https://www.gnu.org/software/gawk/ URL: https://www.gnu.org/software/gawk/
Source0: https://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.xz Source0: https://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.xz
@ -35,8 +35,8 @@ Requires: filesystem >= 3
Requires: libsigsegv Requires: libsigsegv
Requires(post): info Requires(post): info
Requires(preun): info Requires(preun): info
BuildRequires: git
BuildRequires: ghostscript-core BuildRequires: ghostscript-core
BuildRequires: git
BuildRequires: libsigsegv-devel BuildRequires: libsigsegv-devel
BuildRequires: texinfo-tex BuildRequires: texinfo-tex
@ -46,9 +46,6 @@ BuildRequires: texinfo-tex
# to rebuild the affected files. In that case we need to include the # to rebuild the affected files. In that case we need to include the
# BuildRequires line below. # BuildRequires line below.
# #
# If possible, we should create a macro that will specifically check for
# these conditions and add the BuildRequires if necessary.
#
# INFO: Upstream explicitly wishes that we do not use 'yacc' instead of bison. # INFO: Upstream explicitly wishes that we do not use 'yacc' instead of bison.
# For more info, see: https://bugzilla.redhat.com/show_bug.cgi?id=1176993 # For more info, see: https://bugzilla.redhat.com/show_bug.cgi?id=1176993
#BuildRequires: bison #BuildRequires: bison
@ -114,6 +111,7 @@ about gawk extensions, please refer to `The GNU Awk User's Guide`.
However, unless you are developing an extension to gawk, you most likely do not However, unless you are developing an extension to gawk, you most likely do not
need this subpackage. need this subpackage.
# ---------------
%package doc %package doc
Summary: Additional documentation for gawk utility Summary: Additional documentation for gawk utility
@ -160,14 +158,20 @@ make check
%install %install
make install DESTDIR=%{buildroot} %make_install
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
ln -sf gawk.1.gz %{buildroot}%{_mandir}/man1/awk.1.gz ln -sf gawk.1.gz %{buildroot}%{_mandir}/man1/awk.1.gz
ln -sf gawk %{buildroot}%{_bindir}/awk ln -sf gawk %{buildroot}%{_bindir}/awk
# Remove the versioned binary hardlink: # Add additional symlinks to */awk folders:
rm -f %{buildroot}%{_bindir}/{,p}gawk-%{version}* ln -sf /usr/share/awk %{buildroot}%{_datadir}/gawk
ln -sf /usr/libexec/awk %{buildroot}%{_libexecdir}/gawk
# Fedora does not support multiple versions of same package installed...
# The */dir file is not necessary for info pages to work correctly...
# ->> remove the versioned binary hardlink & */dir file
rm -f %{buildroot}%{_bindir}/gawk-%{version}*
rm -f %{buildroot}%{_infodir}/dir rm -f %{buildroot}%{_infodir}/dir
# Install the all the documentation in the same folder - /usr/share/doc/gawk: # Install the all the documentation in the same folder - /usr/share/doc/gawk:
@ -175,9 +179,11 @@ mkdir -p %{buildroot}%{_docdir}/%{name}
cp -a html %{buildroot}%{_docdir}/%{name} cp -a html %{buildroot}%{_docdir}/%{name}
cp -a doc/gawk.{pdf,ps} doc/gawkinet.{pdf,ps} %{buildroot}%{_docdir}/%{name} cp -a doc/gawk.{pdf,ps} doc/gawkinet.{pdf,ps} %{buildroot}%{_docdir}/%{name}
# Install NLS language files:
%find_lang %{name} %find_lang %{name}
# Always update the info pages:
%post %post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
@ -197,7 +203,9 @@ fi
%{_infodir}/gawkinet.info* %{_infodir}/gawkinet.info*
%{_libdir}/gawk %{_libdir}/gawk
%{_libexecdir}/awk %{_libexecdir}/awk
%{_libexecdir}/gawk
%{_datadir}/awk %{_datadir}/awk
%{_datadir}/gawk
%{_bindir}/*awk %{_bindir}/*awk
%doc NEWS README POSIX.STD README_d/README.multibyte %doc NEWS README POSIX.STD README_d/README.multibyte