ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/xdaq.spec
Revision: 1.61
Committed: Thu Jun 11 13:01:39 2009 UTC (15 years, 10 months ago) by elmer
Branch: MAIN
CVS Tags: CMSSW_3_3_3_onlpatch5_ONLINE, CMSSW_3_3_3_onlpatch4_ONLINE, CMSSW_3_3_3_onlpatch2_ONLINE, CMSSW_3_3_3_onlpatch3_ONLINE, CMSSW_3_3_3_ONLINE, fw20091114b, fw20091114a, fw20091114, CMSSW_3_3_2_onlpatch2_ONLINE, CMSSW_3_3_2_ONLINE, CMSSW_3_3_2_onlpatch1_ONLINE, CMSSW_3_3_0_onlpatch2_ONLINE, CMSSW_3_2_7_onlpatch6_ONLINE, for330op2, for327op6, CMSSW_3_3_0_onlpatch1_ONLINE, CMSSW_3_2_7_onlpatch5_ONLINE, CMSSW_3_2_7_onlpatch4_ONLINE, sm327op4, CMSSW_3_3_0_ONLINE, sm091013a, sm091012c, sm091012b, sm091012a, CMSSW_3_2_7_onlpatch3_ONLINE, sm091007a, CMSSW_3_2_7_onlpatch2_ONLINE, sm090928a, CMSSW_3_2_7_onlpatch1_ONLINE, CMSSW_3_2_7_ONLINE, sm090923a, sm090922a, pe20090907a-ports, apFor330pre2v0, PerfSuiteDB_20090904_almost_stable, pe20090904a-ports, PerfSuiteDB_20090904, pe20090903b-ports, pe20090903a-ports, PerfSuiteDB_20090901, CMSSW_3_2_1_onlpatch6_ONLINE, sm090829a, forHEARTBEATr04, pe20090827a-ports, CMSSW_3_2_1_onlpatch5_ONLINE, pe20090826a-ports, RPMVERIFY_0_2, sm090826a, forHEARTBEATr01, CMSSW_3_2_1_onlpatch4_ONLINE, sm090818a, CMSSW_3_2_4_ONLINE, sm090813e, sm090813d, sm090813c, sm090813b, sm090813a, CMSSW_3_2_1_onlpatch3_ONLINE, sm090810a, CMSSW_3_2_1_onlpatch2_ONLINE, sm090806a, CMSSW_3_2_1_onlpatch1_ONLINE, apFor321onlp1v1, apFor321onlp1v0, CMSSW_3_2_1-432, pe20090722b-31Xports-432, pe20090722a-31Xports-432, CMSSW_3_2_1_ONLINE, sm090721b, sm090721a, sm090720b, sm090720a, apFor320onlv1, CMSSW_3_1_1_onlpatch3_ONLINE, sm090716a, CMSSW_3_1_1_onlpatch2_ONLINE, sm090715c, sm090715b, sm090715a, CMSSW_3_ONLINE_BOOTSTRAP, sm090709a, CMSSW_3_1_1_onlpatch1_ONLINE, sm090708g, CMSSW_3_1_1_ONLINE, sm090708f, sm090708e, sm090708d, sm090708c, sm090708b, CMSSW_3_1_0_ONLINE2, sm090708a, pe20090707c-31Xports-432, pe20090707b-31Xports-432, pe20090707a-31Xports-432, pe20090706b-31Xports-432, pe20090706a-31Xports-432, CMSSW_3_1_0_onlpatch1_ONLINE, sm090703a, pe20090701a-31Xports-432, CMSSW_3_1_0_ONLINE, sm090701b, sm090701a, CMSSW_3_1_0_pre10_ONLINE, sm090621b, sm090621a, sm090620b, sm090620a, sm090619e, sm090619d, sm090619c, sm090619b, sm090619a, sm090618a, CMSSW_3_1_0_pre10-432, pe20090616a-31Xports-432, pe20090615a-31Xports-432, pe20090611c-31Xports-432
Changes since 1.60: +3 -0 lines
Log Message:
Kludge in a 'mkdir -p include/linux' such that in the gcc4.x case (where
part of the build currently fails) the scram tool configuration is still
correct and scram doesn't complain/hang due to a missing directory.

File Contents

# User Rev Content
1 dlange 1.56 ### RPM external xdaq 03.14.00
2 andreasp 1.60 ## BUILDIF case $(uname):$(uname -p) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac
3    
4 elmer 1.39 Requires: zlib mimetic xerces-c uuid
5 dlange 1.33 %define xdaqv %(echo %v | cut -f1 -d- | tr . _)
6 eulisse 1.2 %define libext so
7 eulisse 1.18
8 elmer 1.57 # Download from cern afs area to speed up testing:
9 dlange 1.44 Source0: http://switch.dl.sourceforge.net/sourceforge/xdaq/coretools_G_V%xdaqv.tgz
10 dlange 1.56 Source1: http://switch.dl.sourceforge.net/sourceforge/xdaq/powerpack_G_V01_13_00.tgz
11     Source2: http://switch.dl.sourceforge.net/sourceforge/xdaq/worksuite_G_V01_13_00.tgz
12     Patch: xdaq_3.14_p1
13     Patch1: xdaq_3.14_p2
14     Provides: /bin/awk
15 ratnik 1.5
16 eulisse 1.7 %prep
17     %setup -T -b 0 -n TriDAS
18     %setup -D -T -b 1 -n TriDAS
19     %setup -D -T -b 2 -n TriDAS
20 dlange 1.34
21 dlange 1.45 %patch -p1
22 dlange 1.50 %patch1 -p1
23 eulisse 1.11 ls
24 eulisse 1.7 echo " Install root in prep:" %{i} %{pkginstroot}
25 ratnik 1.1
26     %build
27     # Xdaq does not provide makeinstall, it uses "simplify" script instead to
28     # reorganize the directory structure after the build is done.
29     # Therefore build is done in the install area.
30    
31     %install
32     # Copy all code into the installation area, and build directly there:
33     cp -rp * %{i} # assuming there are no symlinks in the original source code
34     cd %{i}
35     export XDAQ_ROOT=$PWD
36     cd %{i}/daq
37 elmer 1.57 # Fix up a problem for the 64bit build
38 elmer 1.59 case %cmsplatf in
39     *amd64* )
40     perl -p -i -e "s!configure --prefix!configure --with-pic --prefix!" extern/asyncresolv/Makefile
41     ;;
42     esac
43 dlange 1.36 export MIMETIC_PREFIX=$MIMETIC_ROOT
44     export XERCES_PREFIX=$XERCES_C_ROOT
45 elmer 1.39 export UUID_LIB_PREFIX=$UUID_ROOT/lib
46 elmer 1.53
47     case %cmsplatf in
48 elmer 1.59 *gcc4* | osx*)
49 elmer 1.53 make CPPDEFINES=linux Set=extern_coretools install || true
50     make CPPDEFINES=linux Set=coretools install || true
51     make CPPDEFINES=linux Set=extern_powerpack install || true
52     make CPPDEFINES=linux Set=powerpack install || true
53     cd xdaq2rc
54     make CPPDEFINES=linux install || true
55     cd ..
56     ;;
57     * )
58 dlange 1.34 make CPPDEFINES=linux Set=extern_coretools install
59 dlange 1.30 make CPPDEFINES=linux Set=coretools install
60 dlange 1.34 make CPPDEFINES=linux Set=extern_powerpack install
61 dlange 1.30 make CPPDEFINES=linux Set=powerpack install
62 dlange 1.36 cd xdaq2rc
63 dlange 1.38 make CPPDEFINES=linux install
64 dlange 1.36 cd ..
65 elmer 1.53 ;;
66     esac
67 dlange 1.30
68 ratnik 1.1 # The following structure used as defined in Xdaq "simplify" script:
69     cd %{i}
70 dlange 1.32 mv x86*/lib .
71     mv x86*/bin .
72     mv x86*/include .
73 elmer 1.61 # Make the following directory (it will be missing in the gcc4 case where
74     # things fail during the build and scram at least needs to see it)
75     mkdir -p include/linux
76 dlange 1.44
77 dlange 1.56 mkdir -p htdocs
78 dlange 1.48
79 dlange 1.49 for subdir in `echo "xdaq2rc"; grep -h -v \# build/mfSet.coretools build/mfSet.extern_coretools build/mfSet.extern_powerpack build/mfSet.powerpack | grep -v Packages= | grep '[a-z]' | awk '{print $1}'`
80 dlange 1.46 do
81 dlange 1.48 mkdir -p %{i}/htdocs/$subdir/{images,xml,html}
82     echo $subdir
83     if [ -d daq/$subdir/xml ]; then
84     cd daq/$subdir/xml
85     find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/xml/{} \;
86     cd %{i}
87     fi
88     if [ -d daq/$subdir/images ]; then
89     cd daq/$subdir/images
90     find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/images/{} \;
91     cd %{i}
92     fi
93     if [ -d daq/$subdir/html ]; then
94     cd daq/$subdir/html
95     find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/html/{} \;
96     cd %{i}
97     fi
98 dlange 1.46 done
99 dlange 1.44
100 dlange 1.56 mkdir -p include/interface
101 dlange 1.36 mv daq/interface/evb/include/interface/evb include/interface
102     mv daq/interface/shared/include/interface/shared include/interface
103 dlange 1.56 mkdir -p etc
104 elmer 1.42 mv daq/etc/default.profile etc/
105 dlange 1.32 rm -fr daq
106     rm -fr CVS
107 dlange 1.37 rm -fr x86*
108 ratnik 1.1
109     # Libraries from extern (not found cause they are symlinks)
110 eulisse 1.3
111 eulisse 1.22 #find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \;
112 eulisse 1.11 perl -p -i -e "s|^#!.*make|#!/usr/bin/env make|" %{i}/daq/extern/slp/openslp-1.2.0/debian/rules
113 muzaffar 1.43
114     # SCRAM ToolBox toolfile
115     mkdir -p %i/etc/scram.d
116     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
117     <doc type=BuildSystem::ToolDoc version=1.0>
118     <Tool name=XDAQ version=%v>
119     <info url=http://home.cern.ch/xdaq></info>
120     <lib name=toolbox>
121     <lib name=xdaq>
122     <lib name=config>
123     <lib name=xoap>
124     <lib name=xgi>
125     <lib name=xdata>
126     <lib name=cgicc>
127     <lib name=log4cplus>
128     <lib name=xcept>
129     <lib name=logudpappender>
130     <lib name=peer>
131     <lib name=logxmlappender>
132     <lib name=asyncresolv>
133     <lib name=ptfifo>
134     <lib name=pthttp>
135     <lib name=pttcp>
136     <lib name=i2outils>
137     <lib name=xdaq2rc>
138 dlange 1.56 <lib name=xoapfilter>
139     <lib name=xalan-c>
140     <lib name=xalanMsg>
141     <lib name=wsaddressing>
142     <lib name=wsclientsubscriber>
143     <lib name=wseventing>
144     <lib name=wsserviceeventing>
145 muzaffar 1.43 <Client>
146     <Environment name=XDAQ_BASE default="%i"></Environment>
147     <Environment name=LIBDIR default="$XDAQ_BASE/lib"></Environment>
148     <Environment name=BINDIR default="$XDAQ_BASE/bin"></Environment>
149     <Environment name=INCLUDE default="$XDAQ_BASE/include"></Environment>
150     <Environment name=INCLUDE default="$XDAQ_BASE/include/linux"></Environment>
151     </Client>
152     <use name=xerces-c>
153     <use name=sockets>
154     <use name=mimetic>
155     <use name=uuid>
156     <runtime name=XDAQ_OS value="linux">
157     <runtime name=XDAQ_PLATFORM value="x86">
158     <runtime name=PATH value="$BINDIR" type=path>
159     <runtime name=XDAQ_ROOT value="$XDAQ_BASE">
160 dlange 1.44 <runtime name=XDAQ_DOCUMENT_ROOT value="$XDAQ_BASE/htdocs">
161 muzaffar 1.43 <flags CPPDEFINES="SOAP__ LITTLE_ENDIAN__">
162     <flags CPPDEFINES="linux">
163     </Tool>
164     EOF_TOOLFILE
165    
166 elmer 1.58 cat << \EOF_TOOLFILE >%i/etc/scram.d/xdaqheader
167     <doc type=BuildSystem::ToolDoc version=1.0>
168     <Tool name=XDAQHEADER version=%v>
169     <info url=http://home.cern.ch/xdaq></info>
170     <Client>
171     <Environment name=XDAQHEADER_BASE default="%i"></Environment>
172     <Environment name=INCLUDE default="$XDAQHEADER_BASE/include"></Environment>
173     </Client>
174     </Tool>
175     EOF_TOOLFILE
176    
177 eulisse 1.12 %post
178     find $RPM_INSTALL_PREFIX/%pkgrel -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g" | xargs -n2 ln -sf
179 muzaffar 1.43 %{relocateConfig}etc/scram.d/%n
180 elmer 1.58 %{relocateConfig}etc/scram.d/xdaqheader
181