1 |
valya |
1.10 |
### RPM external pcre 7.9
|
2 |
muzaffar |
1.6 |
Source: http://downloads.sourceforge.net/%n/%n-%{realversion}.tar.bz2
|
3 |
valya |
1.12 |
Requires: bz2lib
|
4 |
elmer |
1.4 |
|
5 |
davidlt |
1.19 |
%define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)
|
6 |
|
|
|
7 |
|
|
%if "%online" != "true"
|
8 |
|
|
Requires: zlib
|
9 |
|
|
%else
|
10 |
|
|
Requires: onlinesystemtools
|
11 |
|
|
%endif
|
12 |
|
|
|
13 |
davidlt |
1.18 |
%if "%{?cms_cxx:set}" != "set"
|
14 |
|
|
%define cms_cxx c++ -std=c++0x
|
15 |
|
|
%endif
|
16 |
|
|
|
17 |
elmer |
1.4 |
%prep
|
18 |
|
|
%setup -n %n-%{realversion}
|
19 |
valya |
1.11 |
%build
|
20 |
davidlt |
1.19 |
CPPFLAGS="-I${BZ2LIB_ROOT}/include -I${ZLIB_ROOT}/include"
|
21 |
|
|
LDFLAGS="-L${BZ2LIB_ROOT}/lib -L${ZLIB_ROOT}/lib"
|
22 |
davidlt |
1.17 |
./configure --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --prefix=%i \
|
23 |
davidlt |
1.18 |
CXX="%cms_cxx" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
24 |
valya |
1.11 |
make
|
25 |
elmer |
1.4 |
|
26 |
muzaffar |
1.6 |
%install
|
27 |
|
|
make install
|
28 |
diego |
1.14 |
# setup dependencies environment
|
29 |
|
|
rm -rf %i/etc/profile.d
|
30 |
|
|
mkdir -p %i/etc/profile.d
|
31 |
|
|
for x in %pkgreqs; do
|
32 |
|
|
case $x in /* ) continue ;; esac
|
33 |
|
|
p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
|
34 |
|
|
echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
|
35 |
|
|
echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
|
36 |
|
|
done
|
37 |
diego |
1.13 |
|
38 |
lat |
1.15 |
# Remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config
|
39 |
|
|
# which we neither need nor use at this time.
|
40 |
|
|
rm -rf %i/lib/pkgconfig
|
41 |
|
|
|
42 |
eulisse |
1.16 |
# Strip libraries.
|
43 |
|
|
%define strip_files %i/lib
|
44 |
lat |
1.15 |
|
45 |
eulisse |
1.16 |
# Do not need to keep the archives.
|
46 |
lat |
1.15 |
rm -f %i/lib/*.{l,}a
|
47 |
|
|
|
48 |
|
|
# Look up documentation online.
|
49 |
eulisse |
1.16 |
%define drop_files %i/share
|
50 |
lat |
1.15 |
|
51 |
eulisse |
1.3 |
%post
|
52 |
|
|
%{relocateConfig}bin/pcre-config
|
53 |
muzaffar |
1.6 |
%{relocateConfig}etc/scram.d/%n
|
54 |
diego |
1.14 |
|
55 |
|
|
# The relocation is also needed because of dependencies
|
56 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.sh
|
57 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh
|