specfile: cleanup in %gawk_api_* macros
* Comments added/updated. * %gawk_api_version renamed to %gawk_api_major_next
This commit is contained in:
parent
6cbe38d7cf
commit
d21c2b8eb3
15
gawk.spec
15
gawk.spec
@ -30,7 +30,7 @@
|
|||||||
# For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE
|
# For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
# Extraction of API major & minor versions, so we can export them below:
|
# Extract the API major & minor versions, so we can export them below:
|
||||||
%global gawk_api_major %%(tar -xf %{SOURCE0} gawk-%{version}/gawkapi.h --to-stdout | \
|
%global gawk_api_major %%(tar -xf %{SOURCE0} gawk-%{version}/gawkapi.h --to-stdout | \
|
||||||
grep -i -e "gawk_api_major.*[[:digit:]]" | \
|
grep -i -e "gawk_api_major.*[[:digit:]]" | \
|
||||||
grep -o -e "[[:digit:]]")
|
grep -o -e "[[:digit:]]")
|
||||||
@ -220,23 +220,26 @@ install -m 0644 -p html/gawkinet/* %{buildroot}%{_docdir}/%{name}/html/gaw
|
|||||||
install -m 0644 -p doc/gawk.{pdf,ps} %{buildroot}%{_docdir}/%{name}
|
install -m 0644 -p doc/gawk.{pdf,ps} %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 0644 -p doc/gawkinet.{pdf,ps} %{buildroot}%{_docdir}/%{name}
|
install -m 0644 -p doc/gawkinet.{pdf,ps} %{buildroot}%{_docdir}/%{name}
|
||||||
|
|
||||||
|
# NOTE: Upstream is referencing this specfile in README file, so we want
|
||||||
|
# to keep as much content as possible in this file...
|
||||||
|
|
||||||
# Generate latest version of 'macros.gawk' file used by gawk extensions:
|
# Generate latest version of 'macros.gawk' file used by gawk extensions:
|
||||||
install -m 0755 -d %{buildroot}%{_rpmconfigdir}/macros.d
|
install -m 0755 -d %{buildroot}%{_rpmconfigdir}/macros.d
|
||||||
|
|
||||||
cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.gawk << _EOF
|
cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.gawk << _EOF
|
||||||
# Current API version:
|
# Current API version:
|
||||||
|
%%gawk_api_version %{gawk_api_major}.%{gawk_api_minor}
|
||||||
%%gawk_api_major %{gawk_api_major}
|
%%gawk_api_major %{gawk_api_major}
|
||||||
%%gawk_api_minor %{gawk_api_minor}
|
%%gawk_api_minor %{gawk_api_minor}
|
||||||
%%gawk_api_version %{gawk_api_major}.%{gawk_api_minor}
|
|
||||||
|
|
||||||
# Next API version which will be incopatible with current API:
|
# Next major API version which will be incopatible with current API:
|
||||||
%%gawk_api_version_next $((%{gawk_api_major} + 1)).0
|
%%gawk_api_major_next $((%{gawk_api_major} + 1)).0
|
||||||
|
|
||||||
# This macro will make sure that your current gawk extension
|
# This macro will make sure that your current gawk extension
|
||||||
# is build against latest gawk API available in buildroot:
|
# is build against latest gawk API available in the buildroot:
|
||||||
%%gawk_abi_requires \\
|
%%gawk_abi_requires \\
|
||||||
Requires: gawk(abi) >= %%{gawk_api_version} \\
|
Requires: gawk(abi) >= %%{gawk_api_version} \\
|
||||||
Requires: gawk(abi) < %%{gawk_api_version_next} \\
|
Requires: gawk(abi) < %%{gawk_api_major_next} \\
|
||||||
%%{nil}
|
%%{nil}
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user