Andreas Schwab
234f2ddb7d
- Update to grep 2.27 * grep no longer reports a false match in a multibyte, non-UTF8 locale like zh_CN.gb18030, with a regular expression like ".*7" that just happens to match the 4-byte representation of gb18030's \uC9, the final byte of which is the digit "7". * grep by default now reads all of standard input if it is a pipe, even if this cannot affect grep's output or exit status. * grep no longer mishandles ranges in nontrivial unibyte locales. * grep -P no longer attempts multiline matches. * grep -m0 -L PAT FILE now outputs "FILE". * To output ':' and tab-align the following character C, grep -T no longer outputs tab-backspace-':'-C, an approach that has problems if run inside an Emacs shell window. * grep -T now uses worst-case widths of line numbers and byte offsets instead of guessing widths that might not work with larger files. * grep no longer reads the input in a few more cases when it is easy to see that matching cannot succeed, e.g., 'grep -f /dev/null'. OBS-URL: https://build.opensuse.org/request/show/444685 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=73
108 lines
3.1 KiB
RPMSpec
108 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package grep
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX 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: grep
|
|
Version: 2.27
|
|
Release: 0
|
|
Summary: Print lines matching a pattern
|
|
License: GPL-3.0+
|
|
Group: Productivity/Text/Utilities
|
|
Url: http://www.gnu.org/software/grep/
|
|
Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
|
Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
|
Source3: http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring
|
|
Patch0: testsuite.patch
|
|
BuildRequires: makeinfo
|
|
BuildRequires: pcre-devel
|
|
BuildRequires: xz
|
|
Requires(pre): %{install_info_prereq}
|
|
Requires(preun): %{install_info_prereq}
|
|
Provides: base:%{_bindir}/grep
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version} < 1120
|
|
BuildRequires: pcre
|
|
%endif
|
|
|
|
%description
|
|
The grep command searches one or more input files for lines
|
|
containing a match to a specified pattern. By default, grep prints
|
|
the matching lines.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1
|
|
%if 0%{?suse_version} < 1120
|
|
echo "ac_cv_search_pcre_compile=\${ac_cv_search_pcre_compile=%{_libdir}/libpcre.a}" >config.cache
|
|
%endif
|
|
|
|
%build
|
|
%global optflags %{optflags} -fPIE
|
|
export LDFLAGS="-pie"
|
|
%if 0%{?suse_version} < 1120
|
|
%configure -C --bindir=/bin --disable-silent-rules
|
|
%else if 0%{?suse_version} < 1310
|
|
%configure --disable-silent-rules
|
|
%else
|
|
%configure --disable-silent-rules --without-included-regex
|
|
%endif
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
make check VERBOSE=1 %{?_smp_mflags}
|
|
|
|
%install
|
|
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
|
%if 0%{?suse_version} < 1120
|
|
install -d %{buildroot}%{_bindir}
|
|
ln -sf ../../bin/egrep %{buildroot}%{_bindir}/egrep
|
|
ln -sf ../../bin/fgrep %{buildroot}%{_bindir}/fgrep
|
|
ln -sf ../../bin/grep %{buildroot}%{_bindir}/grep
|
|
%else
|
|
#UsrMerge
|
|
install -d %{buildroot}/bin
|
|
ln -sf %{_bindir}/egrep %{buildroot}/bin/egrep
|
|
ln -sf %{_bindir}/fgrep %{buildroot}/bin/fgrep
|
|
ln -sf %{_bindir}/grep %{buildroot}/bin/grep
|
|
#EndUsrMerge
|
|
%endif
|
|
%find_lang %{name}
|
|
|
|
%post
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/grep.info.gz
|
|
|
|
%preun
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/grep.info.gz
|
|
|
|
%files -f %{name}.lang
|
|
%defattr(-,root,root)
|
|
%doc README AUTHORS NEWS THANKS TODO COPYING ChangeLog*
|
|
%if 0%{?suse_version} < 1120
|
|
/bin/*
|
|
%else
|
|
#UsrMerge
|
|
/bin/egrep
|
|
/bin/fgrep
|
|
/bin/grep
|
|
#EndUsrMerge
|
|
%endif
|
|
%{_bindir}/*
|
|
%{_mandir}/man1/*%{ext_man}
|
|
%{_infodir}/*%{ext_info}
|
|
|
|
%changelog
|