]> git.pld-linux.org Git - packages/grep.git/blob - grep.spec
- rel 3; incorporate patches from debian that give huge boost in multibyte locale
[packages/grep.git] / grep.spec
1 #
2 # Conditional build:
3 %bcond_without  pcre    # with PCRE support
4 #
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
15 Name:           grep
16 Version:        2.5.3
17 Release:        3
18 Epoch:          2
19 License:        GPL v3+
20 Group:          Applications/Text
21 Source0:        http://ftp.gnu.org/gnu/grep/%{name}-%{version}.tar.gz
22 # Source0-md5:  4f371f25f413f700fb1984b878421f9d
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}-locale-names.patch
27 Patch2:         %{name}-pl.po-update.patch
28 Patch3:         %{name}-strerror.patch
29 # from debian; very important for multibytes locale; see https://savannah.gnu.org/bugs/?14472
30 Patch4:         %{name}-egf-speedup.patch
31 Patch5:         %{name}-dfa-optional.patch
32 Patch6:         %{name}-match_icase.patch
33 URL:            http://www.gnu.org/software/grep/grep.html
34 BuildRequires:  autoconf >= 2.53
35 BuildRequires:  automake
36 BuildRequires:  gettext-devel
37 BuildRequires:  libtool
38 %{?with_pcre:BuildRequires:     pcre-devel}
39 BuildRequires:  texinfo
40 %{?with_pcre:Requires:  pcre}
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _bindir         /bin
44 %define         _exec_prefix    /
45
46 %description
47 The GNU versions of commonly used grep utilities. Grep searches one or
48 more input files for lines which contain a match to a specified
49 pattern and then prints the matching lines. GNU's grep utilities
50 include grep, egrep and fgrep.
51
52 %description -l de.UTF-8
53 Die GNU-Versionen der häufig benutzten grep-Utilities. Grep durchsucht
54 eine oder mehrere Eingabedateien nach Zeilen, die auf ein angegebenes
55 Muster passen, und zeigt dann die entsprechenden Zeilen an. GNUs grep
56 enthält grep, egrep und fgrep.
57
58 %description -l es.UTF-8
59 Esta es la implementación GNU del popular utilitario grep. Permite la
60 localización rápida de strings en archivos texto.
61
62 %description -l fr.UTF-8
63 Ceci est l'implémentation par GNU du populaire l'utilitaire grep su
64 Unix. Il permet de localiser rapidement des chaînes de caractéres dans
65 les fichiers.
66
67 %description -l ja.UTF-8
68 GNU プロジェクトによる grep, egrep, fgrep (以下単に grep) をマルチバ
69 イトパッチ(mb1.04)によって日本語対応にしたものです.
70
71 %description -l pl.UTF-8
72 GNU grep jest implementacją popularnego programu uniksowego `grep'.
73 Grep jest jednym z podstawowych narzędzi, korzysta z niego prawie
74 każdy skrypt shella.
75
76 %description -l pt_BR.UTF-8
77 Esta é a implementação GNU do popular utilitário grep. Permite a
78 localização rápida de strings em arquivos texto.
79
80 %description -l ru.UTF-8
81 Это реализация GNU утилиты grep, предназначенной для быстрого поиска
82 по образцу в текстовых файлах.
83
84 %description -l tr.UTF-8
85 Bu, bütün Unix'lerde bulunan ve yaygın olarak kullanılan grep aracının
86 GNU sürümüdür. Metin dosyaları içinde bulunan katarları aramada
87 kullanılır.
88
89 %description -l uk.UTF-8
90 Це GNU реалізація популярної утиліти grep, призначеної для швидкого
91 пошуку по шаблону в текстових файлах.
92
93 %prep
94 %setup -q
95 %patch0 -p1
96 %patch1 -p1
97 %patch2 -p1
98 %patch3 -p1
99 %patch4 -p0
100 %patch5 -p0
101 %patch6 -p0
102
103 # outdated, there is already nb.po
104 rm -f po/no.po
105
106 %build
107 %{__libtoolize}
108 %{__aclocal} -I m4
109 %{__automake}
110 %{__autoheader}
111 %{__autoconf}
112 %configure \
113         %{!?with_pcre:--disable-perl-regexp} \
114         --without-included-regex \
115         --enable-nls
116 %{__make}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT/etc/env.d
121
122 %{__make} install \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/egrep.1
126 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/fgrep.1
127
128 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
129
130 cat << EOF >$RPM_BUILD_ROOT/etc/env.d/GREP_OPTIONS
131 #GREP_OPTIONS="--binary-files=without-match --directories=skip --color=auto"
132 EOF
133
134 %find_lang %{name}
135
136 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
137 rm -f $RPM_BUILD_ROOT%{_mandir}/README.grep-non-english-man-pages
138 rm -f $RPM_BUILD_ROOT%{_mandir}/ja-grep-nozgrep.diff
139
140 %clean
141 rm -rf $RPM_BUILD_ROOT
142
143 %post -p /sbin/postshell
144 -/usr/sbin/fix-info-dir -c %{_infodir}
145 -/sbin/env-update -u
146
147 %postun -p /sbin/postshell
148 -/usr/sbin/fix-info-dir -c %{_infodir}
149 -/sbin/env-update -u
150
151 %files -f %{name}.lang
152 %defattr(644,root,root,755)
153 %doc NEWS README ChangeLog TODO
154 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/*
155 %attr(755,root,root) %{_bindir}/*
156 %{_mandir}/man1/*
157 %lang(cs) %{_mandir}/cs/man1/*
158 %lang(de) %{_mandir}/de/man1/*
159 %lang(es) %{_mandir}/es/man1/*
160 %lang(fi) %{_mandir}/fi/man1/*
161 %lang(fr) %{_mandir}/fr/man1/*
162 %lang(hu) %{_mandir}/hu/man1/*
163 %lang(it) %{_mandir}/it/man1/*
164 %lang(ja) %{_mandir}/ja/man1/*
165 %lang(nl) %{_mandir}/nl/man1/*
166 %lang(pl) %{_mandir}/pl/man1/*
167 %{_infodir}/*info*
This page took 0.108793 seconds and 4 git commands to generate.