1 | #define svn_url e:/trees/grep/trunk
|
---|
2 | %define svn_url http://svn.netlabs.org/repos/ports/grep/trunk
|
---|
3 | %define svn_rev 1697
|
---|
4 |
|
---|
5 | Summary: Pattern matching utilities
|
---|
6 | Name: grep
|
---|
7 | Version: 2.25
|
---|
8 | Release: 1%{?dist}
|
---|
9 | License: GPLv3+
|
---|
10 | URL: http://www.gnu.org/software/grep/
|
---|
11 | Group: Applications/Text
|
---|
12 |
|
---|
13 | Vendor: bww bitwise works GmbH
|
---|
14 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
---|
15 |
|
---|
16 | BuildRequires: pcre-devel >= 3.9-10, gettext
|
---|
17 | BuildRequires: texinfo
|
---|
18 | BuildRequires: autoconf automake
|
---|
19 |
|
---|
20 | %description
|
---|
21 | The GNU versions of commonly used grep utilities. Grep searches through
|
---|
22 | textual input for lines which contain a match to a specified pattern and then
|
---|
23 | prints the matching lines. GNU's grep utilities include grep, egrep and fgrep.
|
---|
24 |
|
---|
25 | GNU grep is needed by many scripts, so it shall be installed on every system.
|
---|
26 |
|
---|
27 | %debug_package
|
---|
28 |
|
---|
29 | %prep
|
---|
30 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
---|
31 | %setup -q
|
---|
32 | %else
|
---|
33 | %setup -n "%{name}-%{version}" -Tc
|
---|
34 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
---|
35 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
---|
36 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
---|
37 | %endif
|
---|
38 |
|
---|
39 | %build
|
---|
40 | # we do autoreconf even fedora doesn't do it
|
---|
41 | autoreconf -fi
|
---|
42 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
43 | %configure --without-included-regex --disable-silent-rules \
|
---|
44 | CPPFLAGS="-I%{_includedir}/pcre"
|
---|
45 | make %{?_smp_mflags}
|
---|
46 |
|
---|
47 | %install
|
---|
48 | rm -rf ${RPM_BUILD_ROOT}
|
---|
49 | make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install
|
---|
50 | gzip $RPM_BUILD_ROOT%{_infodir}/grep*
|
---|
51 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
---|
52 |
|
---|
53 | %find_lang %name
|
---|
54 |
|
---|
55 | %check
|
---|
56 | #make check
|
---|
57 |
|
---|
58 | %clean
|
---|
59 | rm -rf ${RPM_BUILD_ROOT}
|
---|
60 |
|
---|
61 | %post
|
---|
62 | #/sbin/install-info --quiet --info-dir=%{_infodir} %{_infodir}/grep.info.gz || :
|
---|
63 |
|
---|
64 | %preun
|
---|
65 | #if [ $1 = 0 ]; then
|
---|
66 | # /sbin/install-info --quiet --info-dir=%{_infodir} --delete %{_infodir}/grep.info.gz || :
|
---|
67 | #fi
|
---|
68 |
|
---|
69 | %files -f %{name}.lang
|
---|
70 | %defattr(-,root,root)
|
---|
71 | %doc AUTHORS THANKS TODO NEWS
|
---|
72 | %{!?_licensedir:%global license %%doc}
|
---|
73 | %license COPYING
|
---|
74 |
|
---|
75 | %{_bindir}/*
|
---|
76 | %exclude %{_bindir}/*.dbg
|
---|
77 | %{_infodir}/*.info*.gz
|
---|
78 | %{_mandir}/*/*
|
---|
79 |
|
---|
80 | %changelog
|
---|
81 | * Mon Sep 12 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.25-1
|
---|
82 | - update to version 2.25
|
---|
83 |
|
---|
84 | * Sun Jan 08 2012 yd
|
---|
85 | - initial unixroot build.
|
---|
86 | - fixed bindir value.
|
---|