ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.43
Committed: Mon Feb 16 18:45:22 2009 UTC (16 years, 2 months ago) by eulisse
Branch: MAIN
CVS Tags: DBS-APP_20100122_slc4, DBS-APP_20100121_slc4, DBS-WEB_20100120_slc4, DBS-APP_20100120_slc4, DBS-APP_20100118_slc4, DBS-WEB_20100118_slc4, DBS-APP_20100114_slc4, DBS-WEB_20100113_slc4, DAS_20091202, FILEMOVER_20091118, DBS-APPS_20090929, pe20091117a-fromDAS_20090709, pe20091116b-fromDAS_20090709, pe20091116a-fromDAS_20090709, DAS_20091104, DBS-WEB_20091021, DAS_20091016, DAS_20091014, DBS-WEB_20091012, DBS-WEB_20090921, pe20090910-fromDAS_20090709, FILEMOVER_20090910, DBS-WEB_20090817, FILEMOVER_20090828, DBS-APPS_20090706, WEBTOOLS_APPS_20090817, DBS-APPS_20090804, DBS-APPS_20090730, DAS_20090709, DAS_20090607, DBS-WEB_20090618, DBS-APPS_20090619, DBS-APPS_20090608, CMSSW_3_1_0_pre9, DBS-APPS_20090604_1, DAS_20090604, DBS-APPS_20090604, DAS_20090603, DBS-APPS_20090603, CMSSW_3_1_0_pre8, DBS-APPS_20090528, pe20090525a-31Xports-432, dl090520t2, dl090520, DBS_APPS_20090518, CMSSW_3_1_0_pre7, DAS_20090514_3, DAS_20090514_2, DAS_20090514_1, DAS_20090514, pe20090514b-31Xports-432, dl090514t3, dl090514t2, pe20090514a-31Xports-432, dl090514, DBS-WEB_20090512, pe20090512a-31Xports-432, pe20090511a-31Xports-432, dl090509, DBS-WEB_20090507, dl090504gcc41, pe20090505b-31Xports-432, pe20090505a-31Xports-432, dl090504, pe20090504a-31Xports-432, DBS_APPS_20090504, CMSSW_3_1_0_pre6, DBS_APPS_20090501, DBS-APPS_20090429_2, DBS-WEB_20090429, DBS-APPS_20090429, DBS-WEB_20090428, dl090425, DBS-WEB_20090422, dl090421, DBS-WEB_20090420, DBS-APPS_20090417, CMSSW_3_1_0_pre5, dl090416, DBS-APPS_20090415, pe20090414a-31Xports-432, dl090410, DBS-APPS_20090410, dl090409t2, dl090409, DAS_20090408, pe20090407a-31Xports-432, dl090406t2, dl090406, DBS-APPS_20090406, pe20090406b-31Xports-432, pe20090406a-31Xports-432, dl090403, pe20090403a-31Xports-432, dl090401t2, DAS_20090330, dl090401, dl090330, dl090329, dl0903029, CMSSW_3_1_0_pre4, DBS-APPS_20090326, DAS_20090319_1, DAS_20090319, pe20090318b-for31X-412, pe20090318b-for31X, DBS-APPS_20090318, pe20090318-for31X, dl090317t2, dl090317, DBS-APPS_20090316, DAS_20090316, DAS_20090313, COUCHDB_20090313, DBS-APPS_20090310, WEBTOOLS-APPS_20090310_1, WEBTOOLS-APPS_20090310, WEBTOOLS-APPS_20090309, CMSSW_3_1_0_pre3, DBS-APPS_20090306, DBS-APPS_20090304_1, DBS-APPS_20090304, pe20090304-for31X-412, pe20090304-for31X, pe20090304b-30Xports-432, pe20090304a-30Xports-432, dl090304_cmsswtoolconf9cms_gcc412, dl090304_cmsswtoolconf9cms, DBS-APPS_20090303_1, DBS-APPS_20090303, DBS-APPS_20090302, dl090302_cmsswtoolconf9gcc412, dl090302_cmsswtoolconf9, dl090301, pe20090226b-30Xports-432, pe20090226a-30Xports-432, pe20090225d-for30XIB-412, pe20090225d-for30XIB, pe20090225c-for30XIB, pe20090225b-for30XIB-412, pe20090225b-for30XIB, pe20090225a-for30XIB, pe20090224b-30Xports-432, pe20090224a-30Xports-432, pe20090224c-for30XIB-412, pe20090224c-for30XIB, pe20090224b-for30XIB-412, pe20090224b-for30XIB, pe20090224a-for30XIB-412, pe20090224a-for30XIB, DBS-APPS_20090220_1, DBS-APPS_20090220, MEMCACHED_20090219_1, MEMCACHED_20090219, pe20090218a-30Xports-432
Changes since 1.42: +1 -1 lines
Log Message:
only pick up .so libs

File Contents

# User Rev Content
1 elmer 1.40 ### RPM external boost 1.38.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 argiro 1.1
5 ratnik 1.25 Requires: boost-build python bz2lib
6 eulisse 1.42 %if "%cmsplatf" == "slc4onl_ia32_gcc346"
7     %else
8 ratnik 1.25 Requires: zlib
9     %endif
10    
11 argiro 1.1 %prep
12     %setup -n %{n}%{boostver}
13    
14     %build
15     # Note that some targets will fail to build (the test programs have
16     # missing symbols), causing darwin to fail to link and bjam to return
17     # an error. So ignore the exit code from bjam on darwin to avoid
18     # RPM falsely detecting a problem.
19 ratnik 1.25 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
20 argiro 1.1 PR="PYTHON_ROOT=$PYTHON_ROOT"
21 ratnik 1.25
22 elmer 1.17 # The following line assumes a version of the form x.y.z-XXXX, where the
23     # "-XXXX" part represents some CMS rebuild of version x.y.z
24     BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
25 ratnik 1.25 BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
26    
27 ratnik 1.37 %if "%cmsplatf" != "slc4onl_ia32_gcc346"
28 eulisse 1.8 ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
29     ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
30    
31 argiro 1.1 case $(uname) in
32 elmer 1.33 Darwin ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
33 dlange 1.22 * ) bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
34 argiro 1.1 esac
35 ratnik 1.25 %else
36     bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
37     %endif
38 argiro 1.1
39     %install
40     case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
41 dlange 1.20 #no debug libs...
42     #mkdir -p %i/lib/debug
43     mkdir %i/lib
44     #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
45 elmer 1.33 # Perhaps the following could be done with a wildcard for the darwin/gcc dir
46 eulisse 1.42 case %cmsplatf in
47     osx*)
48 elmer 1.33 (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp {} %i/lib/. \;)
49     ;;
50 eulisse 1.42 * )
51 elmer 1.33 (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp {} %i/lib/. \;)
52     ;;
53     esac
54 eulisse 1.42
55 eulisse 1.7 find boost -name '*.[hi]*' -print |
56 argiro 1.1 while read f; do
57     mkdir -p %i/include/$(dirname $f)
58     install -c $f %i/include/$f
59     done
60     find libs -name '*.py' -print |
61     while read f; do
62     mkdir -p %i/lib/$(dirname $f)
63     install -c $f %i/lib/$f
64     done
65 eulisse 1.6
66 ratnik 1.19 # Do all manipulation with files before creating symbolic links:
67     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
68 elmer 1.33 #strip %i/lib/*.$so
69 ratnik 1.19
70 eulisse 1.42 for l in `find %i/lib -name "*.$so.*"`
71     do
72     ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
73     done
74 ratnik 1.31
75 eulisse 1.4 (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
76 ratnik 1.16
77 eulisse 1.41 getLibName()
78     {
79 eulisse 1.43 libname=`find %i/lib -name "libboost_$1*mt*.$so" -exec basename {} \;`
80 eulisse 1.41 echo $libname | sed -e 's|[.][^-]*$||;s|^lib||'
81     }
82    
83     export BOOST_THREAD_LIB=`getLibName thread`
84     export BOOST_SIGNALS_LIB=`getLibName signals`
85     export BOOST_FILESYSTEM_LIB=`getLibName filesystem`
86     export BOOST_PROGRAM_OPTIONS_LIB=`getLibName program_options`
87     export BOOST_PYTHON_LIB=`getLibName python`
88     export BOOST_REGEX_LIB=`getLibName regex`
89    
90 muzaffar 1.21 # SCRAM ToolBox toolfile
91     mkdir -p %i/etc/scram.d
92     # boost toolfile
93     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
94     <doc type=BuildSystem::ToolDoc version=1.0>
95     <Tool name=boost version=%v>
96     <info url="http://www.boost.org"></info>
97 eulisse 1.41 <lib name="@BOOST_THREAD_LIB@">
98     <lib name="@BOOST_SIGNALS_LIB@">
99 muzaffar 1.21 <Client>
100     <Environment name=BOOST_BASE default="%i"></Environment>
101     <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
102     <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
103     </Client>
104     <use name=sockets>
105 dlange 1.22 <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
106     <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
107 muzaffar 1.21 </Tool>
108     EOF_TOOLFILE
109    
110     # boost_filesystem toolfile
111     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
112     <doc type=BuildSystem::ToolDoc version=1.0>
113     <Tool name=boost_filesystem version=%v>
114     <info url="http://www.boost.org"></info>
115 eulisse 1.41 <lib name="@BOOST_FILESYSTEM_LIB@">
116 muzaffar 1.21 <use name=boost>
117     </Tool>
118     EOF_TOOLFILE
119    
120     # boost_program_options toolfile
121     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
122     <doc type=BuildSystem::ToolDoc version=1.0>
123     <Tool name=boost_program_options version=%v>
124     <info url="http://www.boost.org"></info>
125 eulisse 1.41 <lib name="@BOOST_PROGRAM_OPTIONS_LIB@">
126 muzaffar 1.21 <use name=boost>
127     </Tool>
128     EOF_TOOLFILE
129    
130     # boost_python toolfile
131     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
132     <doc type=BuildSystem::ToolDoc version=1.0>
133     <Tool name=boost_python version=%v>
134     <info url="http://www.boost.org"></info>
135 eulisse 1.41 <lib name="@BOOST_PYTHON_LIB@">
136 muzaffar 1.21 <Client>
137     <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
138     <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
139     <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
140     <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
141     </Client>
142     <use name=elementtree>
143     <use name=gccxml>
144     <use name=python>
145     </Tool>
146     EOF_TOOLFILE
147    
148     # boost_regex toolfile
149     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
150     <doc type=BuildSystem::ToolDoc version=1.0>
151     <Tool name=boost_regex version=%v>
152     <info url="http://www.boost.org"></info>
153 eulisse 1.41 <lib name="@BOOST_REGEX_LIB@">
154 muzaffar 1.21 <use name=boost>
155     </Tool>
156     EOF_TOOLFILE
157    
158     # boost_signals toolfile
159     cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
160     <doc type=BuildSystem::ToolDoc version=1.0>
161     <Tool name=boost_signals version=%v>
162     <info url="http://www.boost.org"></info>
163 eulisse 1.41 <lib name="@BOOST_SIGNALS_LIB@">
164 muzaffar 1.21 <use name=boost>
165     </Tool>
166     EOF_TOOLFILE
167    
168 eulisse 1.41 perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
169    
170 muzaffar 1.21 %post
171     %{relocateConfig}etc/scram.d/boost
172     %{relocateConfig}etc/scram.d/boost_filesystem
173     %{relocateConfig}etc/scram.d/boost_program_options
174     %{relocateConfig}etc/scram.d/boost_python
175     %{relocateConfig}etc/scram.d/boost_regex
176     %{relocateConfig}etc/scram.d/boost_signals