SHA256
1
0
forked from pool/gawk
gawk/gawk.spec
Philipp Thomas b9b219b847 Accepting request 175250 from home:namtrac:branches:Base:System
- Update to version 4.1.0
  * The three executables gawk, pgawk, and dgawk, have been merged into
    one, named just gawk.
  * The new -i option (from xgawk) is used for loading awk library files.
  * The new -l option (from xgawk) is used for loading dynamic extensions.
  * The dynamic extension interface has been completely redone.  There is
    now a defined API for C extensions to use.  A C extension acts like
    a function written in awk, except that it cannot do everything that awk
    code can. However, this allows interfacing to any facility that is
    available from C.
  * The "inplace" extension, built using the new facility, can be used to
    simulate the GNU "sed -i" feature.
  * The and(), or() and xor() functions now take any number of arguments,
    with a minimum of two.
  * New arrays: SYMTAB, FUNCTAB, and PROCINFO["identifiers"]. SYMTAB allows
    indirect access to any defined variable or array; it is possible to
    "walk" the symbol table, if that should be necessary.
- Refreshed gawk-3.1.8.diff
- Add older-automake.diff to support automake 1.12

OBS-URL: https://build.opensuse.org/request/show/175250
OBS-URL: https://build.opensuse.org/package/show/Base:System/gawk?expand=0&rev=33
2013-05-14 11:16:30 +00:00

127 lines
3.3 KiB
RPMSpec

#
# spec file for package gawk
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: gawk
Url: http://www.gnu.org/software/gawk/
Provides: awk
BuildRequires: automake
BuildRequires: libtool
BuildRequires: update-alternatives
%if 0%{suse_version} > 1220
BuildRequires: makeinfo
%endif
PreReq: %{install_info_prereq} update-alternatives
Version: 4.1.0
Release: 0
Summary: GNU awk
License: GPL-3.0+
Group: Productivity/Text/Utilities
Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
Source1: gawk-4.0.0h.de.po.bz2
Patch1: gawk-3.1.8.diff
Patch2: older-automake.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GNU awk is upwardly compatible with the System V Release 4 awk. It is
almost completely POSIX 1003.2 compliant.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
bunzip2 -c %{S:1} > po/de.po
rm -f regex.[ch]
chmod -x COPYING
# force rebuild with non-broken makeinfo
rm -f doc/*.info
%build
AUTOPOINT=true autoreconf --force --install
%configure --libexecdir=%{_libdir}
%if %do_profiling
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS %cflags_profile_generate"
make check
make clean
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS %cflags_profile_feedback"
%else
make %{?_smp_mflags}
%endif
make -C po update-po
%check
make check
%install
make install DESTDIR=$RPM_BUILD_ROOT
#UsrMerge
install -d $RPM_BUILD_ROOT/bin
ln -sf %{_bindir}/gawk $RPM_BUILD_ROOT/bin
touch $RPM_BUILD_ROOT/bin/awk
#EndUsrMerge
rm -f $RPM_BUILD_ROOT/usr/bin/*-%{version} $RPM_BUILD_ROOT/usr/bin/awk
# create ghost files
touch $RPM_BUILD_ROOT/%{_bindir}/awk $RPM_BUILD_ROOT/%{_mandir}/man1/awk.1.gz
%find_lang %name
%post
/usr/sbin/update-alternatives --install /bin/awk awk /bin/gawk 20 \
--slave /usr/bin/awk usr-bin-awk /bin/gawk \
--slave %{_mandir}/man1/awk.1.gz awk.1.gz %{_mandir}/man1/gawk.1.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gawk.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gawkinet.info.gz
%preun
if [ $1 -eq 0 ]; then
/usr/sbin/update-alternatives --remove awk /bin/gawk
fi
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gawk.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gawkinet.info.gz
%files -f %name.lang
%defattr(-,root,root)
%if %{suse_version} >= 1120
#UsrMerge
%ghost /bin/awk
#EndUsrMerge
%ghost %{_bindir}/awk
%ghost %{_mandir}/man1/awk.1.gz
%endif
%doc AUTHORS COPYING NEWS POSIX.STD README
#UsrMerge
/bin/gawk
#EndUsrMerge
%{_bindir}/gawk
%{_bindir}/igawk
%{_libdir}/awk
%{_libdir}/gawk
%{_datadir}/awk
%{_includedir}/gawkapi.h
%{_infodir}/*.info.gz
%{_mandir}/man1/gawk.1.gz
%{_mandir}/man1/igawk.1.gz
%{_mandir}/man3/*.gz
%changelog