ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/xdaq.spec
(Generate patch)

Comparing COMP/CMSDIST/xdaq.spec (file contents):
Revision 1.23 by eulisse, Fri Aug 11 12:26:40 2006 UTC vs.
Revision 1.52 by elmer, Fri Nov 2 18:51:04 2007 UTC

# Line 1 | Line 1
1 < ### RPM external xdaq 3.5
2 < Requires: zlib
3 < Requires: oracle
4 < %define xdaqv %(echo %v |tr . _)
1 > ### RPM external xdaq 03.11.00-CMS18
2 > Requires: zlib mimetic xerces-c uuid
3 > %define xdaqv %(echo %v | cut -f1 -d- | tr . _)
4   %define libext so
5   %if "%cmsplatf" == "slc3_ia32_gcc323"
6   %define installDir linux/x86
7   %endif
8  
9   # Download from cern afs area to speed up testing:
10 < #Source0: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/coretools_G_17559_V%xdaqv.tgz
11 < #Source1: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/powerpack_G_28175_V1_3_1.tgz
12 < #Source2: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/worksuite_G_28176_V1_4.tgz
13 < Source0: http://switch.dl.sourceforge.net/sourceforge/xdaq/coretools_G_17559_V%{xdaqv}.tgz
14 < Source1: http://switch.dl.sourceforge.net/sourceforge/xdaq/powerpack_G_28175_V1_4.tgz
16 < Source2: http://switch.dl.sourceforge.net/sourceforge/xdaq/worksuite_G_28176_V1_5.tgz
10 > Source0: http://switch.dl.sourceforge.net/sourceforge/xdaq/coretools_G_V%xdaqv.tgz
11 > Source1: http://switch.dl.sourceforge.net/sourceforge/xdaq/powerpack_G_V01_11_00.tgz
12 > Source2: http://switch.dl.sourceforge.net/sourceforge/xdaq/worksuite_G_V01_11_00.tgz
13 > Patch: xdaq_3.11_p1
14 > Patch1: xdaq_3.11_p2
15  
16   %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 +
21 + %patch -p1
22 + %patch1 -p1
23   ls
23 perl -p -i -e "s|^#.*ksh(.*)|#!/usr/bin/env ksh $1|" daq/extern/SBSVME/1003/v2p3p0/sys/makefile \
24                                                     daq/extern/SBSVME/1003/v2p3p0/sys/mkbtp
24   echo " Install root in prep:" %{i}    %{pkginstroot}
25  
26   %build
# Line 35 | Line 34 | cp -rp *  %{i} # assuming there are no s
34   cd %{i}
35   export XDAQ_ROOT=$PWD
36   cd %{i}/daq
37 < make Set=extern
38 < make Set=coretools
39 < make Set=powerpack
40 < make Set=worksuite
41 < cd tstore
42 < make  ORACLE_INCLUDE=$ORACLE_ROOT/include  ORACLE_LIB=$ORACLE_ROOT/lib
37 > export MIMETIC_PREFIX=$MIMETIC_ROOT
38 > export XERCES_PREFIX=$XERCES_C_ROOT
39 > export UUID_LIB_PREFIX=$UUID_ROOT/lib
40 >
41 > make CPPDEFINES=linux Set=extern_coretools install
42 > make CPPDEFINES=linux Set=coretools install
43 > make CPPDEFINES=linux Set=extern_powerpack install
44 > make CPPDEFINES=linux Set=powerpack install
45 > cd xdaq2rc
46 > make CPPDEFINES=linux install
47 > cd ..
48 >
49 >
50   # The following structure used as defined in Xdaq "simplify" script:
45 #cd %{i}
46 # Catch-all
47 # cp -r ./lib %{i}/lib
48 # cp -r ./bin %{i}/bin
51   cd %{i}
52 < find daq -path *src* -type d -exec rm -rf daq/{} \;
53 < # copies all the libraries in extern in %i/lib
54 < mkdir -p %{i}/lib/linux/x86
55 < mkdir -p %{i}/bin/linux/x86
56 < (cd %{i}/lib; find ../daq -path "*/lib/lib*" -exec ln -s {} . \;)
57 < (cd %{i}/lib/linux/x86; find ../../../daq -path "*/lib/lib*" -exec ln -s {} . \;)
58 < (cd %{i}/bin; find ../daq -path "*/bin/*.exe" -exec ln -s {} . \;)
59 < (cd %{i}/bin/linux/x86; find ../../../daq -path "*/bin/*.exe" -exec ln -s {} . \;)
60 <
61 < #tar cpfv - `find daq -path "*/lib/*.%{libext}"` | ( cd  %{i}/lib; tar xpfv -)
62 < #tar cpfv - `find daq -path "*/bin/*.exe" -type f` | ( cd  %{i}/bin; tar xpfv -)
63 <
64 < #links them back to lib and bin
65 < #find daq  -type f -name "*.%{libext}" -exec ln -sf {}  %{i}/lib \;
66 < #find daq  -type f -name "*.%{libext}" -exec ln -sf ../../{} %{i}/lib/%installDir \;
67 < #find daq  -type f -name "*.exe" -exec ln -sf {} %{i}/bin \;
68 < #find daq  -type f -name "*.exe" -exec ln -sf ../../{} %{i}/bin/%installDir \;
52 > mv x86*/lib .
53 > mv x86*/bin .
54 > mv x86*/include .
55 >
56 > mkdir htdocs
57 >
58 > 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}'`
59 > do
60 >        mkdir -p %{i}/htdocs/$subdir/{images,xml,html}
61 >        echo $subdir
62 >        if [ -d daq/$subdir/xml ]; then
63 >                cd daq/$subdir/xml
64 >                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/xml/{} \;
65 >                cd %{i}
66 >        fi      
67 >        if [ -d daq/$subdir/images ]; then
68 >                cd daq/$subdir/images
69 >                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/images/{} \;
70 >                cd %{i}
71 >        fi      
72 >        if [ -d daq/$subdir/html ]; then
73 >                cd daq/$subdir/html
74 >                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/html/{} \;
75 >                cd %{i}
76 >        fi      
77 > done
78 >
79 > mkdir include/interface
80 > mv daq/interface/evb/include/interface/evb include/interface
81 > mv daq/interface/shared/include/interface/shared include/interface
82 > mkdir etc
83 > mv daq/etc/default.profile etc/
84 > rm -fr daq
85 > rm -fr CVS
86 > rm -fr x86*
87  
88   # Libraries from extern (not found cause they are symlinks)
89  
90   #find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \;
91   perl -p -i -e "s|^#!.*make|#!/usr/bin/env make|" %{i}/daq/extern/slp/openslp-1.2.0/debian/rules
92 +
93 + # SCRAM ToolBox toolfile
94 + mkdir -p %i/etc/scram.d
95 + cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
96 + <doc type=BuildSystem::ToolDoc version=1.0>
97 + <Tool name=XDAQ version=%v>
98 + <info url=http://home.cern.ch/xdaq></info>
99 + <lib name=toolbox>
100 + <lib name=xdaq>
101 + <lib name=config>
102 + <lib name=xoap>
103 + <lib name=xgi>
104 + <lib name=xdata>
105 + <lib name=cgicc>
106 + <lib name=log4cplus>
107 + <lib name=xcept>
108 + <lib name=logudpappender>
109 + <lib name=peer>
110 + <lib name=logxmlappender>
111 + <lib name=asyncresolv>
112 + <lib name=ptfifo>
113 + <lib name=pthttp>
114 + <lib name=pttcp>
115 + <lib name=i2outils>
116 + <lib name=xdaq2rc>
117 + <Client>
118 + <Environment name=XDAQ_BASE  default="%i"></Environment>
119 + <Environment name=LIBDIR default="$XDAQ_BASE/lib"></Environment>
120 + <Environment name=BINDIR default="$XDAQ_BASE/bin"></Environment>
121 + <Environment name=INCLUDE default="$XDAQ_BASE/include"></Environment>
122 + <Environment name=INCLUDE default="$XDAQ_BASE/include/linux"></Environment>
123 + </Client>
124 + <use name=xerces-c>
125 + <use name=sockets>
126 + <use name=mimetic>
127 + <use name=uuid>
128 + <runtime name=XDAQ_OS value="linux">
129 + <runtime name=XDAQ_PLATFORM value="x86">
130 + <runtime name=PATH value="$BINDIR" type=path>
131 + <runtime name=XDAQ_ROOT value="$XDAQ_BASE">
132 + <runtime name=XDAQ_DOCUMENT_ROOT value="$XDAQ_BASE/htdocs">
133 + <flags CPPDEFINES="SOAP__ LITTLE_ENDIAN__">
134 + <flags CPPDEFINES="linux">
135 + </Tool>
136 + EOF_TOOLFILE
137 +
138   %post
73 find $RPM_INSTALL_PREFIX/%pkgrel -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g"
139   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
140 + %{relocateConfig}etc/scram.d/%n

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines