# # spec file for package grep # # Copyright (c) 2012 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: grep BuildRequires: automake BuildRequires: pcre-devel %if 0%{?suse_version} < 1120 BuildRequires: pcre %endif Url: http://www.gnu.org/software/grep/ Provides: base:/usr/bin/grep PreReq: %{install_info_prereq} Version: 2.14 Release: 0 Summary: Print lines matching a pattern License: GPL-3.0+ Group: Productivity/Text/Utilities # URL for Source0: http://ftp.gnu.org/gnu/grep/grep-2.14.tar.xz # URL for the GPG signature for Source0: http://ftp.gnu.org/gnu/grep/grep-2.14.tar.xz.sig # How to verify Source0: # To import the required public key run: gpg --keyserver keys.gnupg.net --recv-keys 7FD9FCCB000BEEEE # To verify Source0 run: gpg --verify grep-2.14.tar.xz.sig # The result should look like: # gpg: Good signature from "Jim Meyering " # gpg: WARNING: This key is not certified with a trusted signature! # In the openSUSE build service SLE_11_SP1 does not provide an "xz" package # so that "BuildRequires: xz" cannot be used to make it work with Source0 as is. # To convert from xz to bzip2 do: xz -cd grep-2.14.tar.xz | bzip2 -9c >grep-2.14.tar.bz2 Source0: grep-%{version}.tar.bz2 # Up-to-date German messages for grep Source1: grep-%{version}.de.po.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %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 bunzip2 -dc %{S:1} > po/de.po %if 0%{?suse_version} < 1120 echo "ac_cv_search_pcre_compile=\${ac_cv_search_pcre_compile=%{_libdir}/libpcre.a}" >config.cache %endif %build %ifarch ppc ppc64 export CFLAGS="$RPM_OPT_FLAGS -mlong-double-64" %endif %if 0%{?suse_version} < 1120 %configure -C --bindir=/bin --disable-silent-rules --without-included-regex %else AUTOPOINT=true autoreconf --force --install %configure --disable-silent-rules --without-included-regex %endif %{__make} %{?_smp_mflags} %check make check VERBOSE=1 %install %makeinstall %if 0%{?suse_version} < 1120 install -d %{buildroot}/usr/bin 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 %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/grep.info.gz %files -f %name.lang %defattr(-,root,root) %doc README AUTHORS NEWS THANKS TODO %if 0%{?suse_version} < 1120 /bin/* %else #UsrMerge /bin/egrep /bin/fgrep /bin/grep #EndUsrMerge %endif %{_bindir}/* %{_mandir}/man1/*.gz %{_infodir}/*.gz %changelog