3 %bcond_without pcre # with PCRE support
5 Summary: GNU grep Utilities
6 Summary(de.UTF-8): GNU-Version der Pattern-Matching-Utilities
7 Summary(es.UTF-8): Utilitarios grep GNU
8 Summary(fr.UTF-8): Utilitaires grep de GNU
9 Summary(ja.UTF-8): GNU grep の日本語対応版です.
10 Summary(pl.UTF-8): GNU grep
11 Summary(pt_BR.UTF-8): Utilitários grep GNU
12 Summary(ru.UTF-8): Утилиты поиска по шаблонам GNU grep
13 Summary(tr.UTF-8): Dosyalarda katar arama aracı
14 Summary(uk.UTF-8): Утиліти пошуку по шаблонам GNU grep
20 Group: Applications/Text
21 Source0: http://ftp.gnu.org/gnu/grep/%{name}-%{version}.tar.gz
22 # Source0-md5: 92258031d98d4f12dfc6a6d24057e672
23 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
24 # Source1-md5: 1b5e726d0bee53e898531de4a76ad290
25 Patch0: %{name}-info.patch
26 Patch1: %{name}-strerror.patch
27 # from debian; very important for multibytes locale; see https://savannah.gnu.org/bugs/?14472
28 Patch2: %{name}-egf-speedup.patch
29 Patch3: %{name}-match_icase.patch
30 Patch4: %{name}-pl.po-update.patch
31 URL: http://www.gnu.org/software/grep/grep.html
32 BuildRequires: autoconf >= 2.53
33 BuildRequires: automake
34 BuildRequires: gettext-devel
35 BuildRequires: libtool
36 %{?with_pcre:BuildRequires: pcre-devel}
37 BuildRequires: texinfo
38 %{?with_pcre:Requires: pcre}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define _exec_prefix /
45 The GNU versions of commonly used grep utilities. Grep searches one or
46 more input files for lines which contain a match to a specified
47 pattern and then prints the matching lines. GNU's grep utilities
48 include grep, egrep and fgrep.
50 %description -l de.UTF-8
51 Die GNU-Versionen der häufig benutzten grep-Utilities. Grep durchsucht
52 eine oder mehrere Eingabedateien nach Zeilen, die auf ein angegebenes
53 Muster passen, und zeigt dann die entsprechenden Zeilen an. GNUs grep
54 enthält grep, egrep und fgrep.
56 %description -l es.UTF-8
57 Esta es la implementación GNU del popular utilitario grep. Permite la
58 localización rápida de strings en archivos texto.
60 %description -l fr.UTF-8
61 Ceci est l'implémentation par GNU du populaire l'utilitaire grep su
62 Unix. Il permet de localiser rapidement des chaînes de caractéres dans
65 %description -l ja.UTF-8
66 GNU プロジェクトによる grep, egrep, fgrep (以下単に grep) をマルチバ
67 イトパッチ(mb1.04)によって日本語対応にしたものです.
69 %description -l pl.UTF-8
70 GNU grep jest implementacją popularnego programu uniksowego `grep'.
71 Grep jest jednym z podstawowych narzędzi, korzysta z niego prawie
74 %description -l pt_BR.UTF-8
75 Esta é a implementação GNU do popular utilitário grep. Permite a
76 localização rápida de strings em arquivos texto.
78 %description -l ru.UTF-8
79 Это реализация GNU утилиты grep, предназначенной для быстрого поиска
80 по образцу в текстовых файлах.
82 %description -l tr.UTF-8
83 Bu, bütün Unix'lerde bulunan ve yaygın olarak kullanılan grep aracının
84 GNU sürümüdür. Metin dosyaları içinde bulunan katarları aramada
87 %description -l uk.UTF-8
88 Це GNU реалізація популярної утиліти grep, призначеної для швидкого
89 пошуку по шаблону в текстових файлах.
106 %{!?with_pcre:--disable-perl-regexp} \
107 --without-included-regex \
112 rm -rf $RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT/etc/env.d
116 DESTDIR=$RPM_BUILD_ROOT
118 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/egrep.1
119 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/fgrep.1
121 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
123 cat << EOF >$RPM_BUILD_ROOT/etc/env.d/GREP_OPTIONS
124 #GREP_OPTIONS="--binary-files=without-match --directories=skip --color=auto"
129 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
130 rm -f $RPM_BUILD_ROOT%{_mandir}/README.grep-non-english-man-pages
131 rm -f $RPM_BUILD_ROOT%{_mandir}/ja-grep-nozgrep.diff
134 rm -rf $RPM_BUILD_ROOT
136 %post -p /sbin/postshell
137 -/usr/sbin/fix-info-dir -c %{_infodir}
140 %postun -p /sbin/postshell
141 -/usr/sbin/fix-info-dir -c %{_infodir}
144 %files -f %{name}.lang
145 %defattr(644,root,root,755)
146 %doc NEWS README ChangeLog TODO
147 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/*
148 %attr(755,root,root) %{_bindir}/*
150 %lang(cs) %{_mandir}/cs/man1/*
151 %lang(de) %{_mandir}/de/man1/*
152 %lang(es) %{_mandir}/es/man1/*
153 %lang(fi) %{_mandir}/fi/man1/*
154 %lang(fr) %{_mandir}/fr/man1/*
155 %lang(hu) %{_mandir}/hu/man1/*
156 %lang(it) %{_mandir}/it/man1/*
157 %lang(ja) %{_mandir}/ja/man1/*
158 %lang(nl) %{_mandir}/nl/man1/*
159 %lang(pl) %{_mandir}/pl/man1/*