]> git.pld-linux.org Git - packages/grep.git/blob - grep.spec
Rel 2; Fixes gnulib "Operation not supported" error when grepping -r
[packages/grep.git] / grep.spec
1 #
2 # Conditional build:
3 %bcond_without  pcre    # PCRE support
4 %bcond_without  tests   # don't perform "make check"
5 #
6 Summary:        GNU grep Utilities
7 Summary(de.UTF-8):      GNU-Version der Pattern-Matching-Utilities
8 Summary(es.UTF-8):      Utilitarios grep GNU
9 Summary(fr.UTF-8):      Utilitaires grep de GNU
10 Summary(ja.UTF-8):      GNU grep の日本語対応版です.
11 Summary(pl.UTF-8):      GNU grep
12 Summary(pt_BR.UTF-8):   Utilitários grep GNU
13 Summary(ru.UTF-8):      Утилиты поиска по шаблонам GNU grep
14 Summary(tr.UTF-8):      Dosyalarda katar arama aracı
15 Summary(uk.UTF-8):      Утиліти пошуку по шаблонам GNU grep
16 Name:           grep
17 Version:        3.11
18 Release:        2
19 Epoch:          2
20 License:        GPL v3+
21 Group:          Applications/Text
22 Source0:        https://ftp.gnu.org/gnu/grep/%{name}-%{version}.tar.xz
23 # Source0-md5:  7c9bbd74492131245f7cdb291fa142c0
24 Source1:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
25 # Source1-md5:  1b5e726d0bee53e898531de4a76ad290
26 Patch0:         %{name}-info.patch
27 Patch1:         %{name}-pl.po-update.patch
28 Patch2:         disable-unstable-test.patch
29 # check and drop with grep 3.12+
30 Patch3:         %{name}-dirfd.patch
31 URL:            http://www.gnu.org/software/grep/grep.html
32 BuildRequires:  autoconf >= 2.63
33 BuildRequires:  automake >= 1:1.11
34 BuildRequires:  gettext-tools >= 0.18.2
35 %{?with_pcre:BuildRequires:     pcre2-8-devel}
36 BuildRequires:  pkgconfig >= 1:0.9.0
37 BuildRequires:  tar >= 1:1.22
38 BuildRequires:  texinfo
39 BuildRequires:  xz
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _bindir         /bin
43 %define         _exec_prefix    /
44
45 %description
46 The GNU versions of commonly used grep utilities. Grep searches one or
47 more input files for lines which contain a match to a specified
48 pattern and then prints the matching lines. GNU's grep utilities
49 include grep, egrep and fgrep.
50
51 %description -l de.UTF-8
52 Die GNU-Versionen der häufig benutzten grep-Utilities. Grep durchsucht
53 eine oder mehrere Eingabedateien nach Zeilen, die auf ein angegebenes
54 Muster passen, und zeigt dann die entsprechenden Zeilen an. GNUs grep
55 enthält grep, egrep und fgrep.
56
57 %description -l es.UTF-8
58 Esta es la implementación GNU del popular utilitario grep. Permite la
59 localización rápida de strings en archivos texto.
60
61 %description -l fr.UTF-8
62 Ceci est l'implémentation par GNU du populaire l'utilitaire grep su
63 Unix. Il permet de localiser rapidement des chaînes de caractéres dans
64 les fichiers.
65
66 %description -l ja.UTF-8
67 GNU プロジェクトによる grep, egrep, fgrep (以下単に grep) をマルチバ
68 イトパッチ(mb1.04)によって日本語対応にしたものです.
69
70 %description -l pl.UTF-8
71 GNU grep jest implementacją popularnego programu uniksowego `grep'.
72 Grep jest jednym z podstawowych narzędzi, korzysta z niego prawie
73 każdy skrypt shella.
74
75 %description -l pt_BR.UTF-8
76 Esta é a implementação GNU do popular utilitário grep. Permite a
77 localização rápida de strings em arquivos texto.
78
79 %description -l ru.UTF-8
80 Это реализация GNU утилиты grep, предназначенной для быстрого поиска
81 по образцу в текстовых файлах.
82
83 %description -l tr.UTF-8
84 Bu, bütün Unix'lerde bulunan ve yaygın olarak kullanılan grep aracının
85 GNU sürümüdür. Metin dosyaları içinde bulunan katarları aramada
86 kullanılır.
87
88 %description -l uk.UTF-8
89 Це GNU реалізація популярної утиліти grep, призначеної для швидкого
90 пошуку по шаблону в текстових файлах.
91
92 %prep
93 %setup -q
94 %patch0 -p1
95 %patch1 -p1
96 %patch2 -p1
97 %patch3 -p1
98
99 %{__rm} po/stamp-po
100
101 %build
102 %{__gettextize}
103 %{__aclocal} -I m4
104 %{__autoconf}
105 %{__autoheader}
106 %{__automake}
107 %configure \
108         %{!?with_pcre:--disable-perl-regexp} \
109         --disable-silent-rules \
110         --without-included-regex
111 %{__make}
112
113 %if %{with tests}
114 # mksh fails "unset columns" check (bash and pdksh are OK)
115 %{__make} -j1 check-expensive \
116         SHELL=/bin/bash
117 %endif
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121 install -d $RPM_BUILD_ROOT/etc/shrc.d
122
123 %{__make} install \
124         DESTDIR=$RPM_BUILD_ROOT
125
126 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/egrep.1
127 echo .so grep.1 > $RPM_BUILD_ROOT%{_mandir}/man1/fgrep.1
128
129 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
130
131 cat << EOF >$RPM_BUILD_ROOT/etc/shrc.d/grep.sh
132 #alias grep='/bin/grep --devices=skip --directories=skip --color=auto'
133 EOF
134 cat << EOF >$RPM_BUILD_ROOT/etc/shrc.d/grep.csh
135 #alias grep '/bin/grep --devices=skip --directories=skip --color=auto'
136 EOF
137
138 %find_lang %{name}
139
140 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
141 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.grep-non-english-man-pages
142 %{__rm} $RPM_BUILD_ROOT%{_mandir}/ja-grep-nozgrep.diff
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %post -p /sbin/postshell
148 -/usr/sbin/fix-info-dir -c %{_infodir}
149
150 %postun -p /sbin/postshell
151 -/usr/sbin/fix-info-dir -c %{_infodir}
152
153 %files -f %{name}.lang
154 %defattr(644,root,root,755)
155 %doc AUTHORS ChangeLog NEWS README THANKS TODO
156 %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/grep.*sh
157 %attr(755,root,root) %{_bindir}/egrep
158 %attr(755,root,root) %{_bindir}/fgrep
159 %attr(755,root,root) %{_bindir}/grep
160 %{_mandir}/man1/egrep.1*
161 %{_mandir}/man1/fgrep.1*
162 %{_mandir}/man1/grep.1*
163 %lang(cs) %{_mandir}/cs/man1/*
164 %lang(de) %{_mandir}/de/man1/*
165 %lang(es) %{_mandir}/es/man1/*
166 %lang(fi) %{_mandir}/fi/man1/*
167 %lang(fr) %{_mandir}/fr/man1/*
168 %lang(hu) %{_mandir}/hu/man1/*
169 %lang(it) %{_mandir}/it/man1/*
170 %lang(ja) %{_mandir}/ja/man1/*
171 %lang(nl) %{_mandir}/nl/man1/*
172 %lang(pl) %{_mandir}/pl/man1/*
173 %{_infodir}/grep.info*
This page took 0.109673 seconds and 4 git commands to generate.