SHA256
3
0
forked from pool/gawk
gawk/gawk.spec
Dirk Mueller 1754206727 Accepting request 85073 from home:namtrac:bugfix
- Revert sub/gsub behavior to that of gawk 3.x. Upstream commit
  16de770359370224129f23df745178efe518c02c  
  
  This fixes build of virtuoso in KDE:Distro:Factory and possibly many others.
  Please forward to Factory.

OBS-URL: https://build.opensuse.org/request/show/85073
OBS-URL: https://build.opensuse.org/package/show/Base:System/gawk?expand=0&rev=14
2011-09-27 12:34:28 +00:00

128 lines
3.5 KiB
RPMSpec

#
# spec file for package gawk
#
# Copyright (c) 2011 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/
License: GPLv2+
Group: Productivity/Text/Utilities
Provides: awk
AutoReqProv: on
BuildRequires: update-alternatives
PreReq: %{install_info_prereq} update-alternatives
Version: 4.0.0
Release: 1
Summary: GNU awk
Source: gawk-%{version}.tar.bz2
Patch1: gawk-3.1.8.diff
Patch2: gawk-revert-gsub-gawk3.patch
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.
Authors:
--------
David Trueman <david@cs.dal.ca>
Arnold Robbins <arnold@skeeve.com>
Michal Jaegermann <michal@gorte.phys.ualberta.ca>
Scott Deifik <scottd@amgen.com>
Darrel Hankerson <hankedr@mail.auburn.edu>
Kai Uwe Rommel <rommel@ars.de>
Pat Rankin <rankin@eql.caltech.edu>
%prep
%setup -q
%patch1
%patch2 -p1
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
%check
make check
%install
make install DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/bin
mv -f $RPM_BUILD_ROOT/usr/bin/gawk $RPM_BUILD_ROOT/bin
ln -sf ../../bin/gawk $RPM_BUILD_ROOT/usr/bin
rm -f $RPM_BUILD_ROOT/usr/bin/*-%{version} $RPM_BUILD_ROOT/usr/bin/awk
# create ghost files
touch $RPM_BUILD_ROOT/usr/bin/awk $RPM_BUILD_ROOT/bin/awk \
$RPM_BUILD_ROOT/%{_mandir}/man1/awk.1.gz
%find_lang %name
%clean
rm -rf $RPM_BUILD_ROOT
%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
%ghost /bin/awk
%ghost %{_bindir}/awk
%ghost %{_mandir}/man1/awk.1.gz
%endif
%doc AUTHORS COPYING FUTURES LIMITATIONS NEWS POSIX.STD PROBLEMS README
/bin/gawk
%{_bindir}/dgawk
%{_bindir}/gawk
%{_bindir}/igawk
%{_bindir}/pgawk
%{_libdir}/awk
/usr/share/awk
%{_infodir}/*.info.gz
%{_mandir}/man1/gawk.1.gz
%{_mandir}/man1/igawk.1.gz
%{_mandir}/man1/pgawk.1.gz
%changelog