Projects
home:pandora:RobinOS23
gawk
_service:download_src_package:gawk.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:gawk.spec of Package gawk
%define anolis_release 2 # Extract the API major & minor versions, so we can export them below. # Ensure that the major version is >= 3, since that patch is not yet # in the tarball. %global gawk_api_major %%(x=`tar -xf %{SOURCE0} gawk-%{version}/gawkapi.h --to-stdout 2>/dev/null | \ grep -i -e "gawk_api_major.*[[:digit:]]" | \ grep -o -e "[[:digit:]]"`; \ [ "$x" -lt 3 ] && x=3; echo $x) %global gawk_api_minor %%(tar -xf %{SOURCE0} gawk-%{version}/gawkapi.h --to-stdout 2>/dev/null | \ grep -i -e "gawk_api_minor.*[[:digit:]]" | \ grep -o -e "[[:digit:]]" || :) Name: gawk Version: 5.1.1 Release: %{anolis_release}%{?dist} Summary: The GNU version of the AWK text processing utility 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} BuildRequires: git BuildRequires: gcc BuildRequires: grep BuildRequires: ghostscript BuildRequires: automake BuildRequires: make # 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 # Make check BuildRequires: glibc-all-langpacks BuildRequires: bison Requires: filesystem >= 3 %description The gawk package contains the GNU version of AWK text processing utility. AWK is a programming language designed for text processing and typically used as a data extraction and reporting tool. The gawk utility can be used to do quick and easy text pattern matching, extracting or reformatting. It is considered to be a standard Linux tool for text processing. %package devel Summary: Header file for gawk extensions development Requires: %{name} = %{version}-%{release} %description devel This subpackage provides /usr/include/gawkapi.h header file, which contains definitions for use by extension functions calling into gawk. For more info 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 need this subpackage. %package doc Summary: Additional documentation for gawk utility Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc The base package of gawk comes pre-installed with `GAWK: Effective AWK Programming` and `TCP/IP Internetworking with gawk` user's guides, and you can access them via info pages. However, this way of displaying information is less convenient for printing or displaying images. Therefore, this doc subpackage can provide you with HTML, PDF and PS versions of those documents, which might be useful when you need to access them regularly, and/or when you do not have access to Internet. %package all-langpacks Summary: Additional localisation files for gawk utility Supplements: %{name} = %{version}-%{release} Conflicts: %{name} < 5.0.1-8 %description all-langpacks The base package of gawk supports only the english localisation. This subpackage contains additional localisation files. %prep %autosetup -N -S git cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} . # Add and amend the copied files to the initial commit, patch the source code: git add --all --force . git commit --all --amend --no-edit > /dev/null %autopatch -p1 %build autoreconf --force --verbose %configure %make_build # Build the documentation in PDF, postscript and HTML versions: %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 %install %make_install # 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 # 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} %generate_compatibility_deps %files %dir %{abidir} %{_bindir}/*awk %{abidir}/*awk-option.list %{abidir}/*.dump %{_libdir}/*awk %{_datadir}/*awk %{_libexecdir}/*awk %{_sysconfdir}/profile.d/gawk.* %{_mandir}/man1/* %{_mandir}/man3/* %{_infodir}/*awk*.info* %doc NEWS README POSIX.STD README_d/README.multibyte %license COPYING LICENSE.GPLv2 LICENSE.LGPLv2 LICENSE.BSD # --------------- %files -f %{name}.lang all-langpacks # --------------- %files devel %{_includedir}/gawkapi.h # --------------- # NOTE: For some reason, adding all files in one line causes RPM build to fail. %files doc %doc %{_docdir}/%{name}/gawk.{pdf,ps} %doc %{_docdir}/%{name}/gawkinet.{pdf,ps} %doc %{_docdir}/%{name}/html %changelog * Thu Oct 27 2022 mgb01105731 <mgb01105731@alibaba-inc.com> - 5.1.1-2 - optimise spec file * Mon Mar 07 2022 liuzhilin <liuzhilin@unionech.com> - 5.1.1-1 - Init for Anolis OS 23
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2