]> git.pld-linux.org Git - packages/grep.git/blobdiff - grep.spec
- release 10 - GREP_OPTIONS for env.d added
[packages/grep.git] / grep.spec
index aa0c9383caf5e94ba7142520307290c999bd4b04..ebc3423d8cb1168e1f5ea7dde5b4be694868ed49 100644 (file)
--- a/grep.spec
+++ b/grep.spec
@@ -1,4 +1,7 @@
-# _with_pcre - PCRE support
+#
+# Conditional build:
+%bcond_with    pcre    # PCRE support
+#
 Summary:       GNU grep Utilities
 Summary(de):   GNU-Version der Pattern-Matching-Utilities
 Summary(es):   Utilitarios grep GNU
@@ -11,7 +14,7 @@ Summary(tr):  Dosyalarda katar arama arac
 Summary(uk):   õÔÉ̦ÔÉ ÐÏÛÕËÕ ÐÏ ÛÁÂÌÏÎÁÍ GNU grep
 Name:          grep
 Version:       2.5.1
-Release:       6
+Release:       10
 Epoch:         2
 License:       GPL
 Group:         Applications/Text
@@ -20,10 +23,13 @@ Source0:    ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 1b5e726d0bee53e898531de4a76ad290
 Patch0:                %{name}-info.patch
-Patch1:                %{name}-e%{name}.patch
-%{?_with_pcre:BuildRequires:   pcre-devel}
-%{?_with_pcre:Requires:        pcre}
+Patch1:                %{name}-egrep.patch
+%{?with_pcre:BuildRequires:    pcre-devel}
+%{?with_pcre:Requires: pcre}
 BuildRequires: gettext-devel
+BuildRequires: gettext-devel
+BuildRequires: automake
+BuildRequires: autoconf
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _bindir         /bin
@@ -81,27 +87,46 @@ kullan
 %patch0 -p1
 %patch1 -p1
 
+rm -f m4/{header,init}.m4
+
+# hack: AC_FUNC_STRERROR_R from strerror_r.m4 must override autoconf's version
+# (it contains HAVE_WORKING_STRERROR_R define, needed with glibc 2.x, as
+#  glibc version returns pointer to string and doesn't seem to store string in
+#  supplied buffer(???))
+cat m4/strerror_r.m4 >> acinclude.m4
+touch m4/{header,init}.m4
+
 %build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__automake}
+%{__autoconf}
 %ifarch sparc sparc64
 CPPFLAGS=""
 export CPPFLAGS
 %endif
 %configure \
-       %{?!_with_pcre:--disable-perl-regexp} \
+       %{!?with_pcre:--disable-perl-regexp} \
        --without-included-regex \
        --enable-nls
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/env.d
 
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/egrep.1
 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/fgrep.1
 
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 
+cat << EOF >$RPM_BUILD_ROOT/etc/env.d/GREP_OPTIONS
+#GREP_OPTIONS="--binary-files=without-match --directories=skip --color=auto"
+EOF
+
 %find_lang %{name}
 
 %clean
@@ -116,6 +141,7 @@ rm -rf $RPM_BUILD_ROOT
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc NEWS README ChangeLog TODO
+%attr(644,root,root) %config(noreplace,missingok) %verify(not md5 size mtime) /etc/env.d/*
 %attr(755,root,root) %{_bindir}/*
 %{_mandir}/man1/*
 %lang(cs) %{_mandir}/cs/man1/*
This page took 0.109162 seconds and 4 git commands to generate.