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
|
|
|
#
|
2016-02-05 21:31:40 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
2006-12-19 00:16:42 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-03-14 11:21:46 +01:00
|
|
|
|
2006-12-19 00:16:42 +01:00
|
|
|
Name: grep
|
2016-10-28 15:08:56 +02:00
|
|
|
Version: 2.26
|
2011-12-01 16:53:45 +01:00
|
|
|
Release: 0
|
2006-12-19 00:16:42 +01:00
|
|
|
Summary: Print lines matching a pattern
|
2012-02-07 11:09:11 +01:00
|
|
|
License: GPL-3.0+
|
|
|
|
Group: Productivity/Text/Utilities
|
2014-02-19 13:44:11 +01:00
|
|
|
Url: http://www.gnu.org/software/grep/
|
2013-03-27 15:02:13 +01:00
|
|
|
Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
2013-12-19 11:06:49 +01:00
|
|
|
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
|
2015-11-03 14:51:34 +01:00
|
|
|
Patch0: testsuite.patch
|
2014-02-19 13:44:11 +01:00
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
BuildRequires: xz
|
2014-05-24 19:06:08 +02:00
|
|
|
Requires(pre): %{install_info_prereq}
|
2016-02-05 21:31:40 +01:00
|
|
|
Requires(preun): %{install_info_prereq}
|
2014-05-24 19:06:08 +02:00
|
|
|
Provides: base:%{_bindir}/grep
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-02-19 13:44:11 +01:00
|
|
|
%if 0%{?suse_version} < 1120
|
|
|
|
BuildRequires: pcre
|
|
|
|
%endif
|
|
|
|
|
2006-12-19 00:16:42 +01:00
|
|
|
%description
|
2012-08-24 20:47:51 +02: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.
|
2006-12-19 00:16:42 +01:00
|
|
|
|
|
|
|
%prep
|
2007-10-03 00:55:33 +02:00
|
|
|
%setup -q
|
2015-11-03 14:51:34 +01:00
|
|
|
%patch0 -p1
|
2010-09-23 23:58:18 +02:00
|
|
|
%if 0%{?suse_version} < 1120
|
|
|
|
echo "ac_cv_search_pcre_compile=\${ac_cv_search_pcre_compile=%{_libdir}/libpcre.a}" >config.cache
|
|
|
|
%endif
|
2006-12-19 00:16:42 +01:00
|
|
|
|
2012-04-20 06:49:24 +02:00
|
|
|
%build
|
2016-10-28 15:08:56 +02:00
|
|
|
%global optflags %{optflags} -fPIE
|
2014-12-31 15:00:22 +01:00
|
|
|
export LDFLAGS="-pie"
|
2010-09-23 23:58:18 +02:00
|
|
|
%if 0%{?suse_version} < 1120
|
2013-12-19 11:06:49 +01:00
|
|
|
%configure -C --bindir=/bin --disable-silent-rules
|
|
|
|
%else if 0%{?suse_version} < 1310
|
|
|
|
%configure --disable-silent-rules
|
2010-09-23 23:58:18 +02:00
|
|
|
%else
|
2012-02-07 11:09:11 +01:00
|
|
|
%configure --disable-silent-rules --without-included-regex
|
2010-09-23 23:58:18 +02:00
|
|
|
%endif
|
2014-02-19 13:44:11 +01:00
|
|
|
make %{?_smp_mflags}
|
2009-06-05 22:56:59 +02:00
|
|
|
|
|
|
|
%check
|
2014-02-19 13:44:11 +01:00
|
|
|
make check VERBOSE=1 %{?_smp_mflags}
|
2006-12-19 00:16:42 +01:00
|
|
|
|
|
|
|
%install
|
2016-10-28 15:08:56 +02:00
|
|
|
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
2012-02-07 11:09:11 +01:00
|
|
|
%if 0%{?suse_version} < 1120
|
2014-02-19 13:44:11 +01:00
|
|
|
install -d %{buildroot}%{_bindir}
|
2012-08-24 20:47:51 +02:00
|
|
|
ln -sf ../../bin/egrep %{buildroot}%{_bindir}/egrep
|
|
|
|
ln -sf ../../bin/fgrep %{buildroot}%{_bindir}/fgrep
|
|
|
|
ln -sf ../../bin/grep %{buildroot}%{_bindir}/grep
|
2012-02-07 11:09:11 +01:00
|
|
|
%else
|
|
|
|
#UsrMerge
|
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
|
2012-02-07 11:09:11 +01:00
|
|
|
#EndUsrMerge
|
|
|
|
%endif
|
2014-02-19 13:44:11 +01:00
|
|
|
%find_lang %{name}
|
2006-12-19 00:16:42 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/grep.info.gz
|
|
|
|
|
2016-02-05 21:31:40 +01:00
|
|
|
%preun
|
2006-12-19 00:16:42 +01:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/grep.info.gz
|
|
|
|
|
2014-02-19 13:44:11 +01:00
|
|
|
%files -f %{name}.lang
|
2006-12-19 00:16:42 +01:00
|
|
|
%defattr(-,root,root)
|
2014-02-19 13:44:11 +01:00
|
|
|
%doc README AUTHORS NEWS THANKS TODO COPYING ChangeLog*
|
2012-02-07 11:09:11 +01:00
|
|
|
%if 0%{?suse_version} < 1120
|
2007-11-28 23:12:05 +01:00
|
|
|
/bin/*
|
2012-02-07 11:09:11 +01:00
|
|
|
%else
|
|
|
|
#UsrMerge
|
|
|
|
/bin/egrep
|
|
|
|
/bin/fgrep
|
|
|
|
/bin/grep
|
|
|
|
#EndUsrMerge
|
|
|
|
%endif
|
|
|
|
%{_bindir}/*
|
2016-10-28 15:08:56 +02:00
|
|
|
%{_mandir}/man1/*%{ext_man}
|
|
|
|
%{_infodir}/*%{ext_info}
|
2007-11-28 23:12:05 +01:00
|
|
|
|
2007-03-22 20:43:58 +01:00
|
|
|
%changelog
|