2006-12-19 00:16:42 +01:00
|
|
|
#
|
2011-08-11 10:08:30 +02:00
|
|
|
# spec file for package grep
|
2006-12-19 00:16:42 +01:00
|
|
|
#
|
2021-08-03 14:27:57 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2006-12-19 00:16:42 +01:00
|
|
|
#
|
2008-08-21 17:53:30 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-01-07 16:05:24 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:16:42 +01:00
|
|
|
#
|
|
|
|
|
2012-03-14 11:21:46 +01:00
|
|
|
|
2006-12-19 00:16:42 +01:00
|
|
|
Name: grep
|
2021-08-16 14:20:25 +02:00
|
|
|
Version: 3.7
|
2011-12-01 16:53:45 +01:00
|
|
|
Release: 0
|
2006-12-19 00:16:42 +01:00
|
|
|
Summary: Print lines matching a pattern
|
2018-08-07 09:30:15 +02:00
|
|
|
License: GPL-3.0-or-later
|
2012-02-07 11:09:11 +01:00
|
|
|
Group: Productivity/Text/Utilities
|
2020-01-21 13:43:52 +01:00
|
|
|
URL: https://www.gnu.org/software/grep/
|
2017-06-05 20:55:41 +02:00
|
|
|
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
|
|
|
Source2: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
|
|
|
Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring
|
2020-07-01 14:12:03 +02:00
|
|
|
Source4: profile.sh
|
2020-12-01 15:09:11 +01:00
|
|
|
Source5: %{name}-rpmlintrc
|
2017-02-13 13:43:49 +01:00
|
|
|
BuildRequires: fdupes
|
2014-02-19 13:44:11 +01:00
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: pcre-devel
|
2014-05-24 19:06:08 +02:00
|
|
|
Provides: base:%{_bindir}/grep
|
2014-02-19 13:44:11 +01:00
|
|
|
|
2006-12-19 00:16:42 +01:00
|
|
|
%description
|
2017-02-13 13:43:49 +01:00
|
|
|
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.
|
|
|
|
|
|
|
|
%lang_package
|
2006-12-19 00:16:42 +01:00
|
|
|
|
|
|
|
%prep
|
2020-12-01 15:09:11 +01:00
|
|
|
%autosetup -p1
|
2006-12-19 00:16:42 +01:00
|
|
|
|
2012-04-20 06:49:24 +02:00
|
|
|
%build
|
2017-06-05 20:55:41 +02:00
|
|
|
%configure \
|
|
|
|
--disable-silent-rules \
|
2019-01-07 16:05:24 +01:00
|
|
|
%{nil}
|
2018-11-12 09:14:47 +01:00
|
|
|
%if 0%{?do_profiling}
|
2020-12-01 15:09:11 +01:00
|
|
|
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}"
|
2020-07-01 14:12:03 +02:00
|
|
|
sh %{SOURCE4} # profiling run
|
2020-12-01 15:09:11 +01:00
|
|
|
%make_build clean
|
|
|
|
%make_build CFLAGS="%{optflags} %{cflags_profile_feedback}"
|
2017-06-05 20:55:41 +02:00
|
|
|
%else
|
2020-12-01 15:09:11 +01:00
|
|
|
%make_build
|
2017-06-05 20:55:41 +02:00
|
|
|
%endif
|
2009-06-05 22:56:59 +02:00
|
|
|
|
|
|
|
%check
|
2021-08-16 14:20:25 +02:00
|
|
|
%if 0%{?qemu_user_space_build}
|
|
|
|
echo exit 77 > tests/stack-overflow
|
|
|
|
echo exit 77 > tests/pcre-jitstack
|
|
|
|
echo exit 77 > gnulib-tests/test-c-stack.sh
|
|
|
|
echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow1.c
|
|
|
|
echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow2.c
|
|
|
|
%endif
|
2020-12-01 15:09:11 +01:00
|
|
|
%make_build check
|
2006-12-19 00:16:42 +01:00
|
|
|
|
|
|
|
%install
|
2017-02-13 13:43:49 +01:00
|
|
|
%make_install
|
2020-11-26 11:08:54 +01:00
|
|
|
%if !0%{?usrmerged}
|
2012-08-24 20:47:51 +02:00
|
|
|
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
|
2020-11-26 11:08:54 +01:00
|
|
|
%endif
|
2017-02-13 13:43:49 +01:00
|
|
|
%fdupes -s %{buildroot}
|
2014-02-19 13:44:11 +01:00
|
|
|
%find_lang %{name}
|
2006-12-19 00:16:42 +01:00
|
|
|
|
2017-02-13 13:43:49 +01:00
|
|
|
%files
|
2018-02-26 10:37:58 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc README AUTHORS NEWS THANKS TODO ChangeLog*
|
2020-11-26 11:08:54 +01:00
|
|
|
%if !0%{?usrmerged}
|
2012-02-07 11:09:11 +01:00
|
|
|
/bin/egrep
|
|
|
|
/bin/fgrep
|
|
|
|
/bin/grep
|
2020-11-26 11:08:54 +01:00
|
|
|
%endif
|
2017-02-13 13:43:49 +01:00
|
|
|
%{_bindir}/egrep
|
|
|
|
%{_bindir}/fgrep
|
|
|
|
%{_bindir}/grep
|
2020-12-01 15:09:11 +01:00
|
|
|
%{_mandir}/man1/egrep.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/fgrep.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/grep.1%{?ext_man}
|
|
|
|
%{_infodir}/grep.info%{?ext_info}
|
2017-02-13 13:43:49 +01:00
|
|
|
|
|
|
|
%files lang -f %{name}.lang
|
2007-11-28 23:12:05 +01:00
|
|
|
|
2007-03-22 20:43:58 +01:00
|
|
|
%changelog
|