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.24 by eulisse, Fri Aug 11 15:26:51 2006 UTC vs.
Revision 1.56 by dlange, Wed Feb 20 16:34:58 2008 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.14.00
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
15 < 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_13_00.tgz
12 > Source2: http://switch.dl.sourceforge.net/sourceforge/xdaq/worksuite_G_V01_13_00.tgz
13 > Patch: xdaq_3.14_p1
14 > Patch1: xdaq_3.14_p2
15 > Provides: /bin/awk
16  
17   %prep
18   %setup -T -b 0 -n TriDAS
19   %setup -D -T -b 1 -n TriDAS
20   %setup -D -T -b 2 -n TriDAS
21 +
22 + %patch -p1
23 + %patch1 -p1
24   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
25   echo " Install root in prep:" %{i}    %{pkginstroot}
26  
27   %build
# Line 35 | Line 35 | cp -rp *  %{i} # assuming there are no s
35   cd %{i}
36   export XDAQ_ROOT=$PWD
37   cd %{i}/daq
38 < make Set=extern
39 < make Set=coretools
40 < make Set=powerpack
41 < make Set=worksuite
42 < cd tstore
43 < make  ORACLE_INCLUDE=$ORACLE_ROOT/include  ORACLE_LIB=$ORACLE_ROOT/lib
38 > export MIMETIC_PREFIX=$MIMETIC_ROOT
39 > export XERCES_PREFIX=$XERCES_C_ROOT
40 > export UUID_LIB_PREFIX=$UUID_ROOT/lib
41 >
42 > case %cmsplatf in
43 > slc4_ia32_gcc412 | slc4_ia32_gcc422 | osx104_ppc32_gcc400 | osx104_ia32_gcc401)
44 > make CPPDEFINES=linux Set=extern_coretools install || true
45 > make CPPDEFINES=linux Set=coretools install || true
46 > make CPPDEFINES=linux Set=extern_powerpack install || true
47 > make CPPDEFINES=linux Set=powerpack install || true
48 > cd xdaq2rc
49 > make CPPDEFINES=linux install || true
50 > cd ..
51 > ;;
52 > * )
53 > make CPPDEFINES=linux Set=extern_coretools install
54 > make CPPDEFINES=linux Set=coretools install
55 > make CPPDEFINES=linux Set=extern_powerpack install
56 > make CPPDEFINES=linux Set=powerpack install
57 > cd xdaq2rc
58 > make CPPDEFINES=linux install
59 > cd ..
60 > ;;
61 > esac
62 >
63   # 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
64   cd %{i}
65 < find daq -path *src* -type d -exec rm -rf daq/{} \;
66 < # copies all the libraries in extern in %i/lib
67 < mkdir -p %{i}/lib/linux/x86
68 < mkdir -p %{i}/bin/linux/x86
69 < (cd %{i}/lib; find ../daq -path "*/lib/lib*" -o -name "*.%{libext}" -o -name "*.%{libext}.*"  -exec ln -s {} . \;)
70 < (cd %{i}/lib/linux/x86; find ../../../daq  -path "*/lib/lib*" -o -name "*.%{libext}" -o -path "*.%{libext}.*" -exec ln -s {} . \;)
71 < (cd %{i}/bin; find ../daq -path "*/bin/*.exe" -exec ln -s {} . \;)
72 < (cd %{i}/bin/linux/x86; find ../../../daq -path "*/bin/*.exe" -exec ln -s {} . \;)
73 <
74 < #tar cpfv - `find daq -path "*/lib/*.%{libext}"` | ( cd  %{i}/lib; tar xpfv -)
75 < #tar cpfv - `find daq -path "*/bin/*.exe" -type f` | ( cd  %{i}/bin; tar xpfv -)
76 <
77 < #links them back to lib and bin
78 < #find daq  -type f -name "*.%{libext}" -exec ln -sf {}  %{i}/lib \;
79 < #find daq  -type f -name "*.%{libext}" -exec ln -sf ../../{} %{i}/lib/%installDir \;
80 < #find daq  -type f -name "*.exe" -exec ln -sf {} %{i}/bin \;
81 < #find daq  -type f -name "*.exe" -exec ln -sf ../../{} %{i}/bin/%installDir \;
65 > mv x86*/lib .
66 > mv x86*/bin .
67 > mv x86*/include .
68 >
69 > mkdir -p htdocs
70 >
71 > 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}'`
72 > do
73 >        mkdir -p %{i}/htdocs/$subdir/{images,xml,html}
74 >        echo $subdir
75 >        if [ -d daq/$subdir/xml ]; then
76 >                cd daq/$subdir/xml
77 >                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/xml/{} \;
78 >                cd %{i}
79 >        fi      
80 >        if [ -d daq/$subdir/images ]; then
81 >                cd daq/$subdir/images
82 >                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/images/{} \;
83 >                cd %{i}
84 >        fi      
85 >        if [ -d daq/$subdir/html ]; then
86 >                cd daq/$subdir/html
87 >                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/html/{} \;
88 >                cd %{i}
89 >        fi      
90 > done
91 >
92 > mkdir -p include/interface
93 > mv daq/interface/evb/include/interface/evb include/interface
94 > mv daq/interface/shared/include/interface/shared include/interface
95 > mkdir -p etc
96 > mv daq/etc/default.profile etc/
97 > rm -fr daq
98 > rm -fr CVS
99 > rm -fr x86*
100  
101   # Libraries from extern (not found cause they are symlinks)
102  
103   #find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \;
104   perl -p -i -e "s|^#!.*make|#!/usr/bin/env make|" %{i}/daq/extern/slp/openslp-1.2.0/debian/rules
105 +
106 + # SCRAM ToolBox toolfile
107 + mkdir -p %i/etc/scram.d
108 + cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
109 + <doc type=BuildSystem::ToolDoc version=1.0>
110 + <Tool name=XDAQ version=%v>
111 + <info url=http://home.cern.ch/xdaq></info>
112 + <lib name=toolbox>
113 + <lib name=xdaq>
114 + <lib name=config>
115 + <lib name=xoap>
116 + <lib name=xgi>
117 + <lib name=xdata>
118 + <lib name=cgicc>
119 + <lib name=log4cplus>
120 + <lib name=xcept>
121 + <lib name=logudpappender>
122 + <lib name=peer>
123 + <lib name=logxmlappender>
124 + <lib name=asyncresolv>
125 + <lib name=ptfifo>
126 + <lib name=pthttp>
127 + <lib name=pttcp>
128 + <lib name=i2outils>
129 + <lib name=xdaq2rc>
130 + <lib name=xoapfilter>
131 + <lib name=xalan-c>
132 + <lib name=xalanMsg>
133 + <lib name=wsaddressing>
134 + <lib name=wsclientsubscriber>
135 + <lib name=wseventing>
136 + <lib name=wsserviceeventing>
137 + <Client>
138 + <Environment name=XDAQ_BASE  default="%i"></Environment>
139 + <Environment name=LIBDIR default="$XDAQ_BASE/lib"></Environment>
140 + <Environment name=BINDIR default="$XDAQ_BASE/bin"></Environment>
141 + <Environment name=INCLUDE default="$XDAQ_BASE/include"></Environment>
142 + <Environment name=INCLUDE default="$XDAQ_BASE/include/linux"></Environment>
143 + </Client>
144 + <use name=xerces-c>
145 + <use name=sockets>
146 + <use name=mimetic>
147 + <use name=uuid>
148 + <runtime name=XDAQ_OS value="linux">
149 + <runtime name=XDAQ_PLATFORM value="x86">
150 + <runtime name=PATH value="$BINDIR" type=path>
151 + <runtime name=XDAQ_ROOT value="$XDAQ_BASE">
152 + <runtime name=XDAQ_DOCUMENT_ROOT value="$XDAQ_BASE/htdocs">
153 + <flags CPPDEFINES="SOAP__ LITTLE_ENDIAN__">
154 + <flags CPPDEFINES="linux">
155 + </Tool>
156 + EOF_TOOLFILE
157 +
158   %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"
159   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
160 + %{relocateConfig}etc/scram.d/%n

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines