]>
Commit | Line | Data |
---|---|---|
249b8692 JB |
1 | # |
2 | # Conditional build: | |
77966906 | 3 | %bcond_with pcre # with PCRE support |
249b8692 | 4 | # |
3cc2d18b | 5 | Summary: GNU grep Utilities |
41a4c9e1 JR |
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 | |
3cc2d18b | 15 | Name: grep |
f13bceb8 | 16 | Version: 2.5.1a |
b71d7757 | 17 | Release: 2 |
d2992593 | 18 | Epoch: 2 |
f4818297 | 19 | License: GPL |
695cedbb | 20 | Group: Applications/Text |
77966906 | 21 | Source0: ftp://ftp.gnu.org/gnu/grep/%{name}-%{version}.tar.gz |
f13bceb8 | 22 | # Source0-md5: 71db1cb262c27f02461c4bca514591ce |
f57a8061 | 23 | Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 |
0908e113 | 24 | # Source1-md5: 1b5e726d0bee53e898531de4a76ad290 |
695cedbb | 25 | Patch0: %{name}-info.patch |
249b8692 | 26 | Patch1: %{name}-egrep.patch |
77966906 | 27 | Patch2: %{name}-locale-names.patch |
ae0a595b | 28 | URL: http://www.gnu.org/software/grep/grep.html |
cbb063e7 | 29 | BuildRequires: autoconf |
9167edd4 JB |
30 | BuildRequires: automake |
31 | BuildRequires: gettext-devel | |
2ed08070 | 32 | BuildRequires: libtool |
5190c6bb | 33 | %{?with_pcre:BuildRequires: pcre-devel} |
9167edd4 | 34 | BuildRequires: texinfo |
77966906 | 35 | %{?with_pcre:Requires: pcre} |
e4ade27e | 36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
d1914bad | 37 | |
fa853d6f | 38 | %define _bindir /bin |
39 | %define _exec_prefix / | |
f2c0b3ef | 40 | |
3b97ddea | 41 | %description |
4a381cec | 42 | The GNU versions of commonly used grep utilities. Grep searches one or |
43 | more input files for lines which contain a match to a specified | |
44 | pattern and then prints the matching lines. GNU's grep utilities | |
45 | include grep, egrep and fgrep. | |
d1914bad | 46 | |
41a4c9e1 JR |
47 | %description -l de.UTF-8 |
48 | Die GNU-Versionen der häufig benutzten grep-Utilities. Grep durchsucht | |
4a381cec | 49 | eine oder mehrere Eingabedateien nach Zeilen, die auf ein angegebenes |
50 | Muster passen, und zeigt dann die entsprechenden Zeilen an. GNUs grep | |
41a4c9e1 | 51 | enthält grep, egrep und fgrep. |
d1914bad | 52 | |
41a4c9e1 JR |
53 | %description -l es.UTF-8 |
54 | Esta es la implementación GNU del popular utilitario grep. Permite la | |
55 | localización rápida de strings en archivos texto. | |
27dbf85e | 56 | |
41a4c9e1 JR |
57 | %description -l fr.UTF-8 |
58 | Ceci est l'implémentation par GNU du populaire l'utilitaire grep su | |
59 | Unix. Il permet de localiser rapidement des chaînes de caractéres dans | |
affcb00b | 60 | les fichiers. |
d1914bad | 61 | |
41a4c9e1 JR |
62 | %description -l ja.UTF-8 |
63 | GNU プロジェクトによる grep, egrep, fgrep (以下単に grep) をマルチバ | |
64 | イトパッチ(mb1.04)によって日本語対応にしたものです. | |
bd7fa5d2 | 65 | |
41a4c9e1 JR |
66 | %description -l pl.UTF-8 |
67 | GNU grep jest implementacją popularnego programu uniksowego `grep'. | |
68 | Grep jest jednym z podstawowych narzędzi, korzysta z niego prawie | |
69 | każdy skrypt shella. | |
d1914bad | 70 | |
41a4c9e1 JR |
71 | %description -l pt_BR.UTF-8 |
72 | Esta é a implementação GNU do popular utilitário grep. Permite a | |
73 | localização rápida de strings em arquivos texto. | |
27dbf85e | 74 | |
41a4c9e1 JR |
75 | %description -l ru.UTF-8 |
76 | Это реализация GNU утилиты grep, предназначенной для быстрого поиска | |
77 | по образцу в текстовых файлах. | |
27dbf85e | 78 | |
41a4c9e1 JR |
79 | %description -l tr.UTF-8 |
80 | Bu, bütün Unix'lerde bulunan ve yaygın olarak kullanılan grep aracının | |
81 | GNU sürümüdür. Metin dosyaları içinde bulunan katarları aramada | |
82 | kullanılır. | |
d1914bad | 83 | |
41a4c9e1 JR |
84 | %description -l uk.UTF-8 |
85 | Це GNU реалізація популярної утиліти grep, призначеної для швидкого | |
86 | пошуку по шаблону в текстових файлах. | |
27dbf85e | 87 | |
d1914bad | 88 | %prep |
77966906 | 89 | %setup -q |
f2c0b3ef | 90 | %patch0 -p1 |
afb2116e | 91 | %patch1 -p1 |
77966906 | 92 | %patch2 -p1 |
d1914bad | 93 | |
249b8692 JB |
94 | rm -f m4/{header,init}.m4 |
95 | ||
96 | # hack: AC_FUNC_STRERROR_R from strerror_r.m4 must override autoconf's version | |
97 | # (it contains HAVE_WORKING_STRERROR_R define, needed with glibc 2.x, as | |
98 | # glibc version returns pointer to string and doesn't seem to store string in | |
99 | # supplied buffer(???)) | |
100 | cat m4/strerror_r.m4 >> acinclude.m4 | |
101 | touch m4/{header,init}.m4 | |
102 | ||
77966906 JB |
103 | # there is nb.po included, but more outdated than no.po (only no was in LINGUAS) |
104 | mv -f po/{no,nb}.po | |
105 | ||
d1914bad | 106 | %build |
cbb063e7 JK |
107 | %{__libtoolize} |
108 | %{__aclocal} -I m4 | |
109 | %{__automake} | |
110 | %{__autoconf} | |
fa853d6f | 111 | %ifarch sparc sparc64 |
112 | CPPFLAGS="" | |
113 | export CPPFLAGS | |
114 | %endif | |
b53e70a2 | 115 | %configure \ |
249b8692 | 116 | %{!?with_pcre:--disable-perl-regexp} \ |
e4c450ff | 117 | --without-included-regex \ |
b53e70a2 | 118 | --enable-nls |
135aa3f3 | 119 | %{__make} |
d1914bad | 120 | |
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
7e0ba455 | 123 | install -d $RPM_BUILD_ROOT/etc/env.d |
3cc2d18b | 124 | |
249b8692 JB |
125 | %{__make} install \ |
126 | DESTDIR=$RPM_BUILD_ROOT | |
3cc2d18b | 127 | |
ec6bdc90 | 128 | echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/egrep.1 |
129 | echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/fgrep.1 | |
d1914bad | 130 | |
8f6b6139 | 131 | bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} |
f2c0b3ef | 132 | |
7e0ba455 PG |
133 | cat << EOF >$RPM_BUILD_ROOT/etc/env.d/GREP_OPTIONS |
134 | #GREP_OPTIONS="--binary-files=without-match --directories=skip --color=auto" | |
135 | EOF | |
136 | ||
654e55d0 | 137 | %find_lang %{name} |
da812a95 | 138 | |
5593ef19 ER |
139 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
140 | rm -f $RPM_BUILD_ROOT%{_mandir}/README.grep-non-english-man-pages | |
141 | rm -f $RPM_BUILD_ROOT%{_mandir}/ja-grep-nozgrep.diff | |
142 | ||
d1914bad | 143 | %clean |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
5593ef19 ER |
146 | %post -p /sbin/postshell |
147 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
b71d7757 | 148 | -/sbin/env-update -u |
f2c0b3ef | 149 | |
5593ef19 ER |
150 | %postun -p /sbin/postshell |
151 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
b71d7757 | 152 | -/sbin/env-update -u |
f2c0b3ef | 153 | |
654e55d0 | 154 | %files -f %{name}.lang |
3cc2d18b | 155 | %defattr(644,root,root,755) |
d2992593 | 156 | %doc NEWS README ChangeLog TODO |
cd73d15e | 157 | %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/* |
f4818297 | 158 | %attr(755,root,root) %{_bindir}/* |
ec6bdc90 | 159 | %{_mandir}/man1/* |
02bc8e14 | 160 | %lang(cs) %{_mandir}/cs/man1/* |
8f6b6139 | 161 | %lang(de) %{_mandir}/de/man1/* |
162 | %lang(es) %{_mandir}/es/man1/* | |
163 | %lang(fi) %{_mandir}/fi/man1/* | |
164 | %lang(fr) %{_mandir}/fr/man1/* | |
165 | %lang(hu) %{_mandir}/hu/man1/* | |
166 | %lang(it) %{_mandir}/it/man1/* | |
bd7fa5d2 | 167 | %lang(ja) %{_mandir}/ja/man1/* |
8f6b6139 | 168 | %lang(nl) %{_mandir}/nl/man1/* |
ec6bdc90 | 169 | %lang(pl) %{_mandir}/pl/man1/* |
170 | %{_infodir}/*info* |