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.29 by elmer, Tue May 1 10:53:03 2007 UTC vs.
Revision 1.44 by dlange, Wed Oct 10 22:02:05 2007 UTC

# Line 1 | Line 1
1 < ### RPM external xdaq 3.7.3
2 < Requires: zlib
3 < Requires: oracle
4 < %define xdaqv %(echo %v |tr . _)
1 > ### RPM external xdaq 03.11.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
15 < Source1: http://switch.dl.sourceforge.net/sourceforge/xdaq/powerpack_G_28175_V1_7.tgz
16 < Source2: http://switch.dl.sourceforge.net/sourceforge/xdaq/worksuite_G_28176_V1_7.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  
15   %prep
16   %setup -T -b 0 -n TriDAS
17   %setup -D -T -b 1 -n TriDAS
18   %setup -D -T -b 2 -n TriDAS
19 +
20 + %patch1 -p1
21   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
22   echo " Install root in prep:" %{i}    %{pkginstroot}
23  
24   %build
# Line 35 | Line 32 | cp -rp *  %{i} # assuming there are no s
32   cd %{i}
33   export XDAQ_ROOT=$PWD
34   cd %{i}/daq
35 < make CPPDEFINES=linux Set=extern
36 < make CPPDEFINES=linux Set=coretools
37 < make CPPDEFINES=linux Set=powerpack
38 < make CPPDEFINES=linux Set=worksuite
39 < cd tstore
40 < make  CPPDEFINES=linux ORACLE_INCLUDE=$ORACLE_ROOT/include  ORACLE_LIB=$ORACLE_ROOT/lib
35 > export MIMETIC_PREFIX=$MIMETIC_ROOT
36 > export XERCES_PREFIX=$XERCES_C_ROOT
37 > export UUID_LIB_PREFIX=$UUID_ROOT/lib
38 >
39 > make CPPDEFINES=linux Set=extern_coretools install
40 > make CPPDEFINES=linux Set=coretools install
41 > make CPPDEFINES=linux Set=extern_powerpack install
42 > make CPPDEFINES=linux Set=powerpack install
43 > cd xdaq2rc
44 > make CPPDEFINES=linux install
45 > cd ..
46 >
47 >
48   # 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
49   cd %{i}
50 < find daq -path *src* -type d -exec rm -rf daq/{} \;
51 < # copies all the libraries in extern in %i/lib
52 < mkdir -p %{i}/lib/linux/x86
53 < mkdir -p %{i}/bin/linux/x86
54 < (cd %{i}/lib; find ../daq \( -path "*/lib/lib*" -o -name "*.%{libext}" -o -name "*.%{libext}.*" -o -name "*.a" -o -name "*.la*" -o -name "*.lo*" \) -exec ln -s {} . \;)
55 < (cd %{i}/lib/linux/x86; find ../../../daq  \( -path "*/lib/lib*" -o -name "*.%{libext}" -o -name "*.%{libext}.*" -o -name "*.a" -o -name "*.la*" -o -name "*.lo*" \) -exec ln -s {} . \;)
56 < (cd %{i}/bin; find ../daq -path "*/bin/*.exe" -exec ln -s {} . \;)
57 < (cd %{i}/bin/linux/x86; find ../../../daq -path "*/bin/*.exe" -exec ln -s {} . \;)
58 <
59 < #tar cpfv - `find daq -path "*/lib/*.%{libext}"` | ( cd  %{i}/lib; tar xpfv -)
60 < #tar cpfv - `find daq -path "*/bin/*.exe" -type f` | ( cd  %{i}/bin; tar xpfv -)
61 <
62 < #links them back to lib and bin
63 < #find daq  -type f -name "*.%{libext}" -exec ln -sf {}  %{i}/lib \;
64 < #find daq  -type f -name "*.%{libext}" -exec ln -sf ../../{} %{i}/lib/%installDir \;
65 < #find daq  -type f -name "*.exe" -exec ln -sf {} %{i}/bin \;
66 < #find daq  -type f -name "*.exe" -exec ln -sf ../../{} %{i}/bin/%installDir \;
50 > mv x86*/lib .
51 > mv x86*/bin .
52 > mv x86*/include .
53 >
54 > mkdir htdocs
55 > foreach subdir ( `find java -name icons` )
56 >        cp $subdir/* htdocs
57 > end
58 >
59 > mkdir include/interface
60 > mv daq/interface/evb/include/interface/evb include/interface
61 > mv daq/interface/shared/include/interface/shared include/interface
62 > mkdir etc
63 > mv daq/etc/default.profile etc/
64 > rm -fr daq
65 > rm -fr CVS
66 > rm -fr x86*
67  
68   # Libraries from extern (not found cause they are symlinks)
69  
70   #find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \;
71   perl -p -i -e "s|^#!.*make|#!/usr/bin/env make|" %{i}/daq/extern/slp/openslp-1.2.0/debian/rules
72 +
73 + # SCRAM ToolBox toolfile
74 + mkdir -p %i/etc/scram.d
75 + cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
76 + <doc type=BuildSystem::ToolDoc version=1.0>
77 + <Tool name=XDAQ version=%v>
78 + <info url=http://home.cern.ch/xdaq></info>
79 + <lib name=toolbox>
80 + <lib name=xdaq>
81 + <lib name=config>
82 + <lib name=xoap>
83 + <lib name=xgi>
84 + <lib name=xdata>
85 + <lib name=cgicc>
86 + <lib name=log4cplus>
87 + <lib name=xcept>
88 + <lib name=logudpappender>
89 + <lib name=peer>
90 + <lib name=logxmlappender>
91 + <lib name=asyncresolv>
92 + <lib name=ptfifo>
93 + <lib name=pthttp>
94 + <lib name=pttcp>
95 + <lib name=i2outils>
96 + <lib name=xdaq2rc>
97 + <Client>
98 + <Environment name=XDAQ_BASE  default="%i"></Environment>
99 + <Environment name=LIBDIR default="$XDAQ_BASE/lib"></Environment>
100 + <Environment name=BINDIR default="$XDAQ_BASE/bin"></Environment>
101 + <Environment name=INCLUDE default="$XDAQ_BASE/include"></Environment>
102 + <Environment name=INCLUDE default="$XDAQ_BASE/include/linux"></Environment>
103 + </Client>
104 + <use name=xerces-c>
105 + <use name=sockets>
106 + <use name=mimetic>
107 + <use name=uuid>
108 + <runtime name=XDAQ_OS value="linux">
109 + <runtime name=XDAQ_PLATFORM value="x86">
110 + <runtime name=PATH value="$BINDIR" type=path>
111 + <runtime name=XDAQ_ROOT value="$XDAQ_BASE">
112 + <runtime name=XDAQ_DOCUMENT_ROOT value="$XDAQ_BASE/htdocs">
113 + <flags CPPDEFINES="SOAP__ LITTLE_ENDIAN__">
114 + <flags CPPDEFINES="linux">
115 + </Tool>
116 + EOF_TOOLFILE
117 +
118   %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"
119   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
120 + %{relocateConfig}etc/scram.d/%n

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines