1 |
eulisse |
1.52 |
### RPM external boost 1.42.0
|
2 |
elmer |
1.17 |
%define boostver _%(echo %realversion | tr . _)
|
3 |
ratnik |
1.31 |
Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{n}%{boostver}.tar.gz
|
4 |
muzaffar |
1.46 |
%define closingbrace )
|
5 |
elmer |
1.47 |
%define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac)
|
6 |
argiro |
1.1 |
|
7 |
ratnik |
1.25 |
Requires: boost-build python bz2lib
|
8 |
muzaffar |
1.45 |
%if "%online" != "true"
|
9 |
ratnik |
1.25 |
Requires: zlib
|
10 |
|
|
%endif
|
11 |
|
|
|
12 |
argiro |
1.1 |
%prep
|
13 |
|
|
%setup -n %{n}%{boostver}
|
14 |
|
|
|
15 |
|
|
%build
|
16 |
ratnik |
1.25 |
PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
|
17 |
argiro |
1.1 |
PR="PYTHON_ROOT=$PYTHON_ROOT"
|
18 |
ratnik |
1.25 |
|
19 |
elmer |
1.17 |
# The following line assumes a version of the form x.y.z-XXXX, where the
|
20 |
|
|
# "-XXXX" part represents some CMS rebuild of version x.y.z
|
21 |
|
|
BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
|
22 |
ratnik |
1.25 |
BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
|
23 |
|
|
|
24 |
muzaffar |
1.45 |
%if "%online" != "true"
|
25 |
eulisse |
1.8 |
ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
|
26 |
|
|
ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
|
27 |
|
|
|
28 |
argiro |
1.1 |
case $(uname) in
|
29 |
dsr |
1.51 |
Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR toolset=darwin stage;;
|
30 |
|
|
* ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR toolset=gcc stage;;
|
31 |
argiro |
1.1 |
esac
|
32 |
ratnik |
1.25 |
%else
|
33 |
dsr |
1.51 |
bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI toolset=gcc stage
|
34 |
ratnik |
1.25 |
%endif
|
35 |
argiro |
1.1 |
|
36 |
|
|
%install
|
37 |
|
|
case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
|
38 |
eulisse |
1.52 |
mkdir -p %i/lib %i/include
|
39 |
|
|
# copy files around in their final location.
|
40 |
|
|
# We use tar to reduce the number of processes required
|
41 |
|
|
# and because we need to build the build hierarchy for
|
42 |
|
|
# the files that we are copying.
|
43 |
|
|
pushd stage/lib
|
44 |
|
|
find . -name "*.$so*" -type f | tar cf - -T - | (cd %i/lib; tar xfp -)
|
45 |
|
|
popd
|
46 |
|
|
find boost -name '*.[hi]*' | tar cf - -T - | ( cd %i/include; tar xfp -)
|
47 |
ratnik |
1.19 |
|
48 |
eulisse |
1.42 |
for l in `find %i/lib -name "*.$so.*"`
|
49 |
|
|
do
|
50 |
|
|
ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
|
51 |
|
|
done
|
52 |
ratnik |
1.31 |
|
53 |
eulisse |
1.52 |
pushd libs/python/pyste/install
|
54 |
|
|
python setup.py install --prefix=%i
|
55 |
|
|
popd
|
56 |
|
|
|
57 |
|
|
# Do all manipulation with files before creating symbolic links:
|
58 |
|
|
perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin -type f)
|
59 |
ratnik |
1.16 |
|
60 |
diego |
1.54 |
# setup dependencies environment
|
61 |
|
|
rm -rf %i/etc/profile.d
|
62 |
|
|
mkdir -p %i/etc/profile.d
|
63 |
|
|
for x in %pkgreqs; do
|
64 |
|
|
case $x in /* ) continue ;; esac
|
65 |
|
|
p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
|
66 |
|
|
echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
|
67 |
|
|
echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
|
68 |
|
|
done
|
69 |
diego |
1.53 |
|
70 |
muzaffar |
1.21 |
%post
|
71 |
diego |
1.54 |
%{relocateConfig}etc/profile.d/dependencies-setup.sh
|
72 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh
|