Compare commits

...

21 Commits
rawhide ... f26

Author SHA1 Message Date
David Kaspar [Dee'Kej] 90b5f78eec specfile: added BuildRequires for 'gcc'
https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequire
2018-02-21 17:16:19 +01:00
David Kaspar [Dee'Kej] 28cdf68946 specfile: use %make_build for documentation building as well 2017-11-23 17:03:36 +01:00
David Kaspar [Dee'Kej] 0b13959ebf specfile: updated the build process to use %make_build 2017-11-23 17:03:25 +01:00
David Kaspar [Dee'Kej] 31cecf2245 specfile: update *-devel subpackage to be architecture dependent 2017-11-23 17:03:17 +01:00
David Kaspar [Dee'Kej] 9fb0cb7e5f specfile: 'noarch' removed from *-devel subpackage to comply with FPG 2017-11-23 15:02:01 +01:00
David Kaspar [Dee'Kej] ecfae20604 specfile: ignore case when doing test for gawk(abi)
To be backward compatible with 4.1.3 and older code.
2017-09-18 20:03:58 +02:00
David Kaspar [Dee'Kej] c61771efde specfile: mention the introduction of gawk(abi) in changelog 2017-09-18 19:20:09 +02:00
David Kaspar [Dee'Kej] f1eb78a65d specfile: check if current gawk(abi) is correctly set 2017-09-18 19:19:25 +02:00
David Kaspar [Dee'Kej] 91b64e9879 specfile: introduce the 'gawk(abi)' value in the Provides: field 2017-09-18 19:19:04 +02:00
David Kaspar [Dee'Kej] d4a9eb40ce specfile: additional round of refactoring (comment sections reordered) 2017-09-18 19:19:00 +02:00
David Kaspar [Dee'Kej] 6a9ee7dd55 specfile: files in %files section reordered 2017-09-18 19:18:55 +02:00
David Kaspar [Dee'Kej] 601d30f3a1 specfile: mark gawk-devel subpackage as noarch
gawk-devel currently only contains gawkapi.h header file,
  which is not architecture dependent.
2017-09-18 19:18:50 +02:00
David Kaspar [Dee'Kej] 3b30c6cf6b specfile: use globbing in %files where possible 2017-09-18 19:18:40 +02:00
David Kaspar [Dee'Kej] 785cb56448 specfile: small code refactoring
* creation of /usr/share/bin removed (it is created automatically)
  * few separators between phases added
2017-09-18 19:18:34 +02:00
David Kaspar [Dee'Kej] a77eb45ead specfile: use 'install' wherever possible
... to have better control over file permissions.
2017-09-18 19:18:07 +02:00
David Kaspar [Dee'Kej] 59c18cd1f6 gawk-4.1.4-000-info-pages-fixes.patch added
Resolves: #1486924
2017-09-18 19:17:29 +02:00
David Kaspar [Dee'Kej] 278bd494a2 specfile: revert adding of 'awk*' symlinks for info pages
The previous fix turned out to be non-functional.
2017-09-18 19:16:35 +02:00
David Kaspar [Dee'Kej] 8b83543ae5 specfile: some Requires tags removed to stop rmplint's complains 2017-09-18 19:15:04 +02:00
David Kaspar [Dee'Kej] 26ec52c3db specfile: added 'awk*' symlinks for info pages
Resolves: #1486924
2017-08-31 19:50:17 +02:00
David Kaspar [Dee'Kej] 773389d23c specfile: trailing empty line removed 2017-08-31 19:48:55 +02:00
David Kaspar [Dee'Kej] 583b6d296b specfile: reformatting - few empty lines added 2017-08-31 19:48:51 +02:00
2 changed files with 225 additions and 90 deletions

View File

@ -0,0 +1,81 @@
From ef05a73f24871dff51a7ac686f7cfbc03addf4c8 Mon Sep 17 00:00:00 2001
From: "Arnold D. Robbins" <arnold@skeeve.com>
Date: Wed, 13 Sep 2017 21:50:12 +0300
Subject: [PATCH] Small fixes to doc for use with info command.
---
doc/gawk.info | 2 +-
doc/gawk.texi | 2 +-
doc/gawkinet.info | 2 +-
doc/gawkinet.texi | 2 +-
doc/gawktexi.in | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/gawk.info b/doc/gawk.info
index 6dcbfc3..e1c610e 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -25,7 +25,7 @@ END-INFO-DIR-ENTRY
INFO-DIR-SECTION Individual utilities
START-INFO-DIR-ENTRY
-* awk: (gawk)Invoking gawk. Text scanning and processing.
+* awk: (gawk)Invoking Gawk. Text scanning and processing.
END-INFO-DIR-ENTRY

diff --git a/doc/gawk.texi b/doc/gawk.texi
index acf57e5..ff72a6f 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -16,7 +16,7 @@
@end direntry
@dircategory Individual utilities
@direntry
-* awk: (gawk)Invoking gawk. Text scanning and processing.
+* awk: (gawk)Invoking Gawk. Text scanning and processing.
@end direntry
@c Enable better indexing, requires texindex from Texinfo 6 or later.
diff --git a/doc/gawkinet.info b/doc/gawkinet.info
index d5a7abf..bb89265 100644
--- a/doc/gawkinet.info
+++ b/doc/gawkinet.info
@@ -24,7 +24,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
software freedom."
INFO-DIR-SECTION Network applications
START-INFO-DIR-ENTRY
-* Gawkinet: (gawkinet). TCP/IP Internetworking With 'gawk'.
+* awkinet: (gawkinet). TCP/IP Internetworking With 'gawk'.
END-INFO-DIR-ENTRY
This file documents the networking features in GNU 'awk'.
diff --git a/doc/gawkinet.texi b/doc/gawkinet.texi
index 07b117d..143ec46 100644
--- a/doc/gawkinet.texi
+++ b/doc/gawkinet.texi
@@ -7,7 +7,7 @@
@dircategory Network applications
@direntry
-* Gawkinet: (gawkinet). TCP/IP Internetworking With `gawk'.
+* awkinet: (gawkinet). TCP/IP Internetworking With `gawk'.
@end direntry
@c Enable better indexing, requires texindex from Texinfo 6 or later.
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 2c94c30..2696b46 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -11,7 +11,7 @@
@end direntry
@dircategory Individual utilities
@direntry
-* awk: (gawk)Invoking gawk. Text scanning and processing.
+* awk: (gawk)Invoking Gawk. Text scanning and processing.
@end direntry
@c Enable better indexing, requires texindex from Texinfo 6 or later.
--
2.9.5

234
gawk.spec
View File

@ -1,63 +1,24 @@
Name: gawk
Summary: The GNU version of the AWK text processing utility
Version: 4.1.4
Release: 3%{?dist}
# LICENSE NOTE: There are more licenses used inside the gawk source tarball from
# ------------- upstream than listed below, however, some of those files with
# different licenses are not used for compiling the resulting
# binaries, nor they are additionally shipped inside the final
# package or its subpackages.
#
# To get latest version of currently used licenses in gawk run: licensecheck
# We assume that files that do not explicitly state their copyright are licensed
# under GPLv3+ as per COPYING file inside root directory of source code.
# Important notes regarding the package:
# ======================================
#
# UPDATE: Upstream has confirmed that the licenses used here are correct:
# http://lists.gnu.org/archive/html/bug-gawk/2016-09/msg00008.html
License: GPLv3+ and GPLv2+ and LGPLv2+ and BSD
URL: https://www.gnu.org/software/gawk/
Source0: https://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.xz
# Additional license files that we have to ship with the package because does
# not include them inside their source tarball and never will (see mail above):
Source1: LICENSE.GPLv2
Source2: LICENSE.LGPLv2
Source3: LICENSE.BSD
Provides: /bin/awk
Provides: /bin/gawk
# Safeguard to allow this package to be installed only on UsrMove enabled
# filesystem. More info: https://fedoraproject.org/wiki/Features/UsrMove
Requires: filesystem >= 3
Requires: libsigsegv
Requires: mpfr
Requires: readline
Requires(post): info
Requires(preun): info
BuildRequires: ghostscript-core
BuildRequires: git
# Extending GAWK possibilities:
BuildRequires: libsigsegv-devel
BuildRequires: mpfr-devel
BuildRequires: readline-devel
# Documentation (gawk-doc):
BuildRequires: texinfo-tex
BuildRequires: texlive-ec
BuildRequires: texlive-cm-super
# NOTE: In case any patch updates the awkgram.y or command.y (IOW if anything
# changes the timestamp of awkgram.y, and it becomes newer than awkgram.c,
# same applies for command.y), the 'make' command will automatically try
# to rebuild the affected files. In that case we need to include the
# BuildRequires line below.
# LICENSES: There are more licenses used inside the gawk source tarball from
# upstream than listed in License: field below. However, some of
# those files with different license are not used for compiling the
# resulting binaries, nor they are additinionally shipped inside the
# final package or its subpacakges
#
# 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
#BuildRequires: bison
# To get latest version of currently used licenses in gawk run the
# licensecheck. We assume that files that do not explicitly state
# their copyright are licensed under GPLv3+ as per COPYING file
# inside root directory of source code.
#
# Also, we have to ship additional license files with the package,
# because upstream does not include them inside their source tarball:
# and never will. They have also confirmed that the additional
# licenses shipped are correct. For more info, see:
#
# http://lists.gnu.org/archive/html/bug-gawk/2016-09/msg00008.html
# === GLOBAL MACROS ===========================================================
@ -69,6 +30,68 @@ BuildRequires: texlive-cm-super
# For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE
%global _hardened_build 1
# We are defining the gawk(abi) version value based on these values, because
# upstream updates the API from time to time, which breaks the ABI for packages
# depending on gawk's shared objects. The gawk(abi) version value is exported
# below via the Provides: field.
#
# These values are defined in the gawkapi.h header file. To see them, run:
# grep -E "gawk_api_(major|minor).*[[:digit:]]" gawkapi.h
%global gawk_api_major 1
%global gawk_api_minor 1
# =============================================================================
Name: gawk
Summary: The GNU version of the AWK text processing utility
Version: 4.1.4
Release: 6%{?dist}
License: GPLv3+ and GPLv2+ and LGPLv2+ and BSD
URL: https://www.gnu.org/software/gawk/
Source0: https://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.xz
Source1: LICENSE.GPLv2
Source2: LICENSE.LGPLv2
Source3: LICENSE.BSD
Provides: /bin/awk
Provides: /bin/gawk
Provides: gawk(abi) = %{gawk_api_major}.%{gawk_api_minor}
# Safeguard to allow this package to be installed only on UsrMove enabled
# filesystem. More info: https://fedoraproject.org/wiki/Features/UsrMove
Requires: filesystem >= 3
Requires(post): info
Requires(preun): info
BuildRequires: git
BuildRequires: gcc
BuildRequires: grep
BuildRequires: ghostscript-core
# Extending GAWK possibilities:
BuildRequires: libsigsegv-devel
BuildRequires: mpfr-devel
BuildRequires: readline-devel
# Documentation (gawk-doc):
BuildRequires: texinfo-tex
BuildRequires: texlive-ec
BuildRequires: texlive-cm-super
# NOTE: In case any patch updates the awkgram.y or command.y (IOW if anything
# changes the timestamp of awkgram.y, and it becomes newer than awkgram.c,
# same applies for command.y), the 'make' command will automatically try
# to rebuild the affected files. In that case we need to include the
# BuildRequires line below.
#
# 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
#BuildRequires: bison
# =============================================================================
# NOTE: 'autosetup' macro (below) uses 'git' for applying the patches:
@ -78,7 +101,7 @@ BuildRequires: texlive-cm-super
# Upstream patches -- official upstream patches released by upstream since the
# ---------------- last rebase that are necessary for any reason:
#Patch000: example000.patch
Patch000: gawk-4.1.4-000-info-pages-fixes.patch
# Downstream patches -- these should be always included when doing rebase:
@ -150,92 +173,124 @@ git add --all --force .
git commit --all --amend --no-edit > /dev/null
%autopatch -p1
# ---------------
%build
%configure
make %{?_smp_mflags}
%make_build
# Build the documentation in PDF, postscript and HTML versions:
make -C doc pdf
%make_build -C doc pdf
mkdir -p html/gawk html/gawkinet
makeinfo --html -I doc -o html/gawk doc/gawk.texi
makeinfo --html -I doc -o html/gawkinet doc/gawkinet.texi
# ---------------
%check
make check
# Check we have correctly specified the ABI version for the current sources:
api_major_vers=$(grep -i -e "gawk_api_major.*[[:digit:]]" gawkapi.h | grep -o -e "[[:digit:]]")
api_minor_vers=$(grep -i -e "gawk_api_minor.*[[:digit:]]" gawkapi.h | grep -o -e "[[:digit:]]")
if [[ "$api_major_vers" != %{gawk_api_major} || "$api_minor_vers" != %{gawk_api_minor} ]]; then
echo "Build Error: specified gawk(abi) version [%{gawk_api_major}.%{gawk_api_minor}] is different than source code API version [$api_major_vers.$api_minor_vers]!" >&2
exit 1
else
unset api_major_vers api_minor_vers
fi
# ---------------
%install
%make_install
mkdir -p %{buildroot}%{_bindir}
ln -sf gawk.1.gz %{buildroot}%{_mandir}/man1/awk.1.gz
ln -sf gawk %{buildroot}%{_bindir}/awk
# Add additional symlinks to */awk folders:
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
# Fedora does not support multiple versions of same package installed,
# and the */dir info file (containing all top nodes) is automatically updated
# in the %%post and %%postun phases...
rm -f %{buildroot}%{_bindir}/gawk-%{version}*
rm -f %{buildroot}%{_infodir}/dir
# Install the all the documentation in the same folder - /usr/share/doc/gawk:
mkdir -p %{buildroot}%{_docdir}/%{name}
cp -a html %{buildroot}%{_docdir}/%{name}
cp -a doc/gawk.{pdf,ps} doc/gawkinet.{pdf,ps} %{buildroot}%{_docdir}/%{name}
# Create additional symlinks:
ln -sf gawk %{buildroot}%{_bindir}/awk
ln -sf gawk.1.gz %{buildroot}%{_mandir}/man1/awk.1.gz
ln -sf /usr/share/awk %{buildroot}%{_datadir}/gawk
ln -sf /usr/libexec/awk %{buildroot}%{_libexecdir}/gawk
# Install NLS language files:
%find_lang %{name}
# Install the all the documentation in the same folder - /usr/share/doc/gawk:
install -m 0755 -d %{buildroot}%{_docdir}/%{name}/html/gawk/
install -m 0755 -d %{buildroot}%{_docdir}/%{name}/html/gawkinet/
install -m 0644 -p html/gawk/* %{buildroot}%{_docdir}/%{name}/html/gawk/
install -m 0644 -p html/gawkinet/* %{buildroot}%{_docdir}/%{name}/html/gawkinet/
install -m 0644 -p doc/gawk.{pdf,ps} %{buildroot}%{_docdir}/%{name}
install -m 0644 -p doc/gawkinet.{pdf,ps} %{buildroot}%{_docdir}/%{name}
# ---------------
# Always update the info pages:
%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
# ---------------
%preun
if [[ $1 -eq 0 ]]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
# === PACKAGING INSTRUCTIONS ==================================================
%files -f %{name}.lang
%{_bindir}/*awk
%{_libdir}/gawk
%{_libexecdir}/*awk
%{_datadir}/*awk
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_infodir}/gawk.info*
%{_infodir}/gawkinet.info*
%{_libdir}/gawk
%{_libexecdir}/awk
%{_libexecdir}/gawk
%{_datadir}/awk
%{_datadir}/gawk
%{_bindir}/*awk
%{_infodir}/*awk*.info*
%doc NEWS README POSIX.STD README_d/README.multibyte
%license COPYING LICENSE.GPLv2 LICENSE.LGPLv2 LICENSE.BSD
# ---------------
%files devel
%{_includedir}/gawkapi.h
# ---------------
%files doc
# NOTE: For some reason, adding all files in one line causes RPM build to fail.
%doc %{_docdir}/%{name}/gawk.pdf
%doc %{_docdir}/%{name}/gawkinet.pdf
%doc %{_docdir}/%{name}/gawk.ps
%doc %{_docdir}/%{name}/gawkinet.ps
%files doc
%doc %{_docdir}/%{name}/gawk.{pdf,ps}
%doc %{_docdir}/%{name}/gawkinet.{pdf,ps}
%doc %{_docdir}/%{name}/html
# =============================================================================
%changelog
* Thu Nov 23 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 4.1.4-6
- 'noarch' removed from *-devel subpackage
- added arch requirement for *-devel subpackage
- updated the build process to use %%make_build macro
* Fri Sep 15 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 4.1.4-5
- Revert previous change of adding 'awk*' symlinks for info pages (bug #1486924)
- Added patch to correctly fix the info pages issue (bug #1486924)
- specfile content refactored for better readability
- Package now provides its ABI version via gawk(abi)
- Added test for usage of correct gawk(abi) into %%check section
* Thu Aug 31 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 4.1.4-4
- Added 'awk*' symlinks for info pages (bug #1486924)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
@ -668,4 +723,3 @@ is defined or not. (For ppc64)
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
- built against glibc