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.49 by dlange, Thu Oct 11 15:44:54 2007 UTC vs.
Revision 1.80 by eulisse, Thu Dec 9 20:39:58 2010 UTC

# Line 1 | Line 1
1 < ### RPM external xdaq 03.11.00
2 < Requires: zlib mimetic xerces-c uuid
1 > ### RPM external xdaq VR16021
2 >
3 > Requires: zlib mimetic xerces-c uuid sqlite
4   %define xdaqv %(echo %v | cut -f1 -d- | tr . _)
5   %define libext so
6 < %if "%cmsplatf" == "slc3_ia32_gcc323"
7 < %define installDir linux/x86
8 < %endif
9 <
10 < # Download from cern afs area to speed up testing:
11 < Source0: http://switch.dl.sourceforge.net/sourceforge/xdaq/coretools_G_V%xdaqv.tgz
12 < Source1: http://switch.dl.sourceforge.net/sourceforge/xdaq/powerpack_G_V01_11_00.tgz
13 < Source2: http://switch.dl.sourceforge.net/sourceforge/xdaq/worksuite_G_V01_11_00.tgz
14 < Patch: xdaq_3.11_p1
6 > %define svntrunk  %(echo %v | sed 's|^VR||')
7 > Source: svn://svn.cern.ch/reps/cmsos/releases/baseline10/tags/base/?scheme=svn+ssh&revision=%svntrunk&strategy=export&module=xdaq&output=/xdaq.tar.gz
8 >
9 > Patch0: xdaq_VR16021_build
10 > Patch1: xdaq_mfDefs_flags
11 > Patch2: xdaq_VR15544_gcc44
12 > Patch3: xdaq-VR16021-gcc45
13 > Patch4: xdaq-VR16021-macosx
14 > Patch5: xdaq-VR16021-fix-slp-macosx
15 >
16 > Provides: /bin/awk
17 > # This is needed on macosx because this is the install_name for the .so
18 > # library.  We could simply run install_name_tool, but I'm not sure if somthing
19 > # will break elsewhere.
20 > Provides: libasyncresolv.0
21  
22   %prep
23 < %setup -T -b 0 -n TriDAS
24 < %setup -D -T -b 1 -n TriDAS
25 < %setup -D -T -b 2 -n TriDAS
26 <
27 < %patch -p1
28 < ls
29 < echo " Install root in prep:" %{i}    %{pkginstroot}
23 > %setup -T -b 0 -n xdaq
24 >
25 > %patch0 -p1
26 > %patch1 -p1
27 > %patch2 -p1
28 > %patch3 -p1
29 > # We do not apply the macosx patch on linux, because we
30 > # do not want to have to validate it.
31 > case %cmsos in
32 >  osx*)
33 > %patch4 -p1
34 > %patch5 -p1
35 >  mkdir daq/toolbox/include/macosx-new
36 >  mv daq/toolbox/include/macosx daq/toolbox/include/macosx-new/toolbox
37 >  mv daq/toolbox/include/macosx-new daq/toolbox/include/macosx
38 >  # Copy the linux implementation for the toolbox, hoping it will work.
39 >  mv daq/toolbox/src/linux daq/toolbox/src/macosx
40 >  # i2o package is case sensitive, but it looks like the all upper case
41 >  # (or partially upper case) files are from an ancient version while the
42 >  # lowercase one are the one needed, therefore we extract by hand the required
43 >  # files.
44 >  cd ..
45 >    rm -f xdaq/daq/extern/i2o/include/i2o/shared/i2omsg.h
46 >    rm -f xdaq/daq/extern/i2o/include/i2o/shared/i2oexec.h
47 >    rm -f xdaq/daq/extern/i2o/include/i2o/shared/I2OTYPES.h
48 >    rm -f xdaq/daq/extern/i2o/include/i2o/shared/I2omodule.h
49 >    rm -f xdaq/daq/extern/i2o/include/i2o/shared/I2outil.h
50 >    tar xzvf %{_sourcedir}/xdaq.tar.gz xdaq/daq/extern/i2o/include/i2o/shared/i2omsg.h \
51 >                                       xdaq/daq/extern/i2o/include/i2o/shared/i2oexec.h \
52 >                                       xdaq/daq/extern/i2o/include/i2o/shared/i2otypes.h \
53 >                                       xdaq/daq/extern/i2o/include/i2o/shared/i2omodule.h \
54 >                                       xdaq/daq/extern/i2o/include/i2o/shared/i2outil.h
55 >  cd xdaq
56 > ;;
57 > esac
58  
59   %build
60   # Xdaq does not provide makeinstall,  it uses "simplify" script instead to
# Line 28 | Line 63 | echo " Install root in prep:" %{i}    %{
63  
64   %install
65   # Copy all code into the installation area, and build directly there:
66 + rm -rf %i
67 + mkdir -p %i
68   cp -rp *  %{i} # assuming there are no symlinks in the original source code
69   cd %{i}
70   export XDAQ_ROOT=$PWD
71   cd %{i}/daq
72 +
73   export MIMETIC_PREFIX=$MIMETIC_ROOT
74   export XERCES_PREFIX=$XERCES_C_ROOT
75   export UUID_LIB_PREFIX=$UUID_ROOT/lib
76 <
77 < 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 ..
76 > export SQLITE_PREFIX=$SQLITE_ROOT
77 > export SEARCH_PATH=$PATH
78  
79 + case %cmsplatf in
80 +  osx*)
81 +        PLATF_DEFINE=macosx
82 +        # Hack to make sure things compile on the mac.
83 +        find . -name Makefile.rules -exec perl -p -i -e 's|cp -pd|cp -p|g' {} \;
84 +        ;;
85 +  slc*) PLATF_DEFINE=linux ;;
86 + esac
87 +
88 + case %cmsplatf in
89 +  slc*)
90 +    make CPPDEFINES=$PLATF_DEFINE Set=extern_coretools install
91 +    make CPPDEFINES=$PLATF_DEFINE Set=coretools install
92 +    make CPPDEFINES=$PLATF_DEFINE Set=extern_powerpack install
93 +    make CPPDEFINES=$PLATF_DEFINE Set=powerpack install
94 +    make CPPDEFINES=$PLATF_DEFINE Set=general_worksuite install
95 +  ;;
96 +  osx*)
97 +    make -k CPPDEFINES=$PLATF_DEFINE CCDefines='-DHAVE_SOCKADDR_STORAGE_SS_LEN=linux -DLIBRARY_PATH_VARIABLE=\"DYLD_LIBRARY_PATH\" -DRLIMIT_SIGPENDING=-1 -DRLIMIT_LOCKS=-1 -DRLIMIT_MSGQUEUE=-1 -DRLIMIT_SIGPENDING=-1 -DLITTLE_ENDIAN__ -D"xdr_uint8_t(x,y)=false" -D"xdr_int8_t(x,y)=false" -D"xdr_uint16_t(x,y)=false" -D"xdr_uint32_t(x,y)=false" -D"xdr_uint64_t(x,y)=false"' Set=extern_coretools install || true
98 +    make -k CPPDEFINES=$PLATF_DEFINE CCDefines='-DHAVE_SOCKADDR_STORAGE_SS_LEN=linux -DLIBRARY_PATH_VARIABLE=\"DYLD_LIBRARY_PATH\" -DRLIMIT_SIGPENDING=-1 -DRLIMIT_LOCKS=-1 -DRLIMIT_MSGQUEUE=-1 -DRLIMIT_SIGPENDING=-1 -DLITTLE_ENDIAN__ -D"xdr_uint8_t(x,y)=false" -D"xdr_int8_t(x,y)=false" -D"xdr_uint16_t(x,y)=false" -D"xdr_uint32_t(x,y)=false" -D"xdr_uint64_t(x,y)=false"' Set=coretools install || true
99 +    make -k CPPDEFINES=$PLATF_DEFINE CCDefines='-DHAVE_SOCKADDR_STORAGE_SS_LEN=linux -DLIBRARY_PATH_VARIABLE=\"DYLD_LIBRARY_PATH\" -DRLIMIT_SIGPENDING=-1 -DRLIMIT_LOCKS=-1 -DRLIMIT_MSGQUEUE=-1 -DRLIMIT_SIGPENDING=-1 -DLITTLE_ENDIAN__ -D"xdr_uint8_t(x,y)=false" -D"xdr_int8_t(x,y)=false" -D"xdr_uint16_t(x,y)=false" -D"xdr_uint32_t(x,y)=false" -D"xdr_uint64_t(x,y)=false"' Set=extern_powerpack install || true
100 +    make -k CPPDEFINES=$PLATF_DEFINE CCDefines='-DHAVE_SOCKADDR_STORAGE_SS_LEN=linux -DLIBRARY_PATH_VARIABLE=\"DYLD_LIBRARY_PATH\" -DRLIMIT_SIGPENDING=-1 -DRLIMIT_LOCKS=-1 -DRLIMIT_MSGQUEUE=-1 -DRLIMIT_SIGPENDING=-1 -DLITTLE_ENDIAN__ -D"xdr_uint8_t(x,y)=false" -D"xdr_int8_t(x,y)=false" -D"xdr_uint16_t(x,y)=false" -D"xdr_uint32_t(x,y)=false" -D"xdr_uint64_t(x,y)=false"' Set=powerpack install || true
101 +    make -k CPPDEFINES=$PLATF_DEFINE CCDefines='-DHAVE_SOCKADDR_STORAGE_SS_LEN=linux -DLIBRARY_PATH_VARIABLE=\"DYLD_LIBRARY_PATH\" -DRLIMIT_SIGPENDING=-1 -DRLIMIT_LOCKS=-1 -DRLIMIT_MSGQUEUE=-1 -DRLIMIT_SIGPENDING=-1 -DLITTLE_ENDIAN__ -D"xdr_uint8_t(x,y)=false" -D"xdr_int8_t(x,y)=false" -D"xdr_uint16_t(x,y)=false" -D"xdr_uint32_t(x,y)=false" -D"xdr_uint64_t(x,y)=false"' Set=general_worksuite install || true
102 +  ;;
103 + esac
104  
105   # The following structure used as defined in Xdaq "simplify" script:
106   cd %{i}
107   mv x86*/lib .
108   mv x86*/bin .
109   mv x86*/include .
110 <
111 < mkdir htdocs
112 <
113 < 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}'`
114 < do
115 <        mkdir -p %{i}/htdocs/$subdir/{images,xml,html}
116 <        echo $subdir
117 <        if [ -d daq/$subdir/xml ]; then
118 <                cd daq/$subdir/xml
119 <                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/xml/{} \;
120 <                cd %{i}
121 <        fi      
122 <        if [ -d daq/$subdir/images ]; then
123 <                cd daq/$subdir/images
124 <                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/images/{} \;
125 <                cd %{i}
126 <        fi      
127 <        if [ -d daq/$subdir/html ]; then
128 <                cd daq/$subdir/html
129 <                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/html/{} \;
110 > # Make the following directory (it will be missing in the gcc4 case where
111 > # things fail during the build and scram at least needs to see it)
112 > mkdir -p include/linux
113 > mkdir -p include/macosx
114 > mkdir -p htdocs
115 >
116 > case %cmsplatf in
117 >  slc*)
118 >    for subdir in `echo "xdaq2rc"; grep -h -v \# config/mfSet.coretools config/mfSet.extern_coretools config/mfSet.extern_powerpack config/mfSet.powerpack | grep -v Packages= | grep '[a-z]' | awk '{print $1}'`
119 >    do
120 >      mkdir -p %{i}/htdocs/$subdir/{images,xml,html}
121 >      echo $subdir
122 >      if [ -d daq/$subdir/xml ]; then
123 >            cd daq/$subdir/xml
124 >        find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/xml/{} \;
125 >            cd %{i}
126 >      fi        
127 >          if [ -d daq/$subdir/images ]; then
128 >            cd daq/$subdir/images
129 >        find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/images/{} \;
130                  cd %{i}
131 <        fi      
132 < done
131 >      fi        
132 >      if [ -d daq/$subdir/html ]; then
133 >            cd daq/$subdir/html
134 >        find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/html/{} \;
135 >            cd %{i}
136 >      fi
137 >    done
138 >  ;;
139 > esac
140  
141 < mkdir include/interface
141 > mkdir -p include/interface
142   mv daq/interface/evb/include/interface/evb include/interface
143   mv daq/interface/shared/include/interface/shared include/interface
144 < mkdir etc
145 < mv daq/etc/default.profile etc/
146 < rm -fr daq
144 > mkdir -p etc
145 > mv daq/xdaq/etc/default.profile etc/
146 > rm -fr daq
147   rm -fr CVS
148   rm -fr x86*
149 + rm -fR java
150 + rm -fR htdocs
151 + ln -s libasyncresolv %{i}/lib/libasyncresolv.so
152 + rm -f %{i}/lib/lib*.a %{i}/lib/lib*.la
153  
154   # Libraries from extern (not found cause they are symlinks)
155  
156   #find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \;
157   perl -p -i -e "s|^#!.*make|#!/usr/bin/env make|" %{i}/daq/extern/slp/openslp-1.2.0/debian/rules
158  
91 # SCRAM ToolBox toolfile
92 mkdir -p %i/etc/scram.d
93 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
94 <doc type=BuildSystem::ToolDoc version=1.0>
95 <Tool name=XDAQ version=%v>
96 <info url=http://home.cern.ch/xdaq></info>
97 <lib name=toolbox>
98 <lib name=xdaq>
99 <lib name=config>
100 <lib name=xoap>
101 <lib name=xgi>
102 <lib name=xdata>
103 <lib name=cgicc>
104 <lib name=log4cplus>
105 <lib name=xcept>
106 <lib name=logudpappender>
107 <lib name=peer>
108 <lib name=logxmlappender>
109 <lib name=asyncresolv>
110 <lib name=ptfifo>
111 <lib name=pthttp>
112 <lib name=pttcp>
113 <lib name=i2outils>
114 <lib name=xdaq2rc>
115 <Client>
116 <Environment name=XDAQ_BASE  default="%i"></Environment>
117 <Environment name=LIBDIR default="$XDAQ_BASE/lib"></Environment>
118 <Environment name=BINDIR default="$XDAQ_BASE/bin"></Environment>
119 <Environment name=INCLUDE default="$XDAQ_BASE/include"></Environment>
120 <Environment name=INCLUDE default="$XDAQ_BASE/include/linux"></Environment>
121 </Client>
122 <use name=xerces-c>
123 <use name=sockets>
124 <use name=mimetic>
125 <use name=uuid>
126 <runtime name=XDAQ_OS value="linux">
127 <runtime name=XDAQ_PLATFORM value="x86">
128 <runtime name=PATH value="$BINDIR" type=path>
129 <runtime name=XDAQ_ROOT value="$XDAQ_BASE">
130 <runtime name=XDAQ_DOCUMENT_ROOT value="$XDAQ_BASE/htdocs">
131 <flags CPPDEFINES="SOAP__ LITTLE_ENDIAN__">
132 <flags CPPDEFINES="linux">
133 </Tool>
134 EOF_TOOLFILE
135
136 %post
137 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
138 %{relocateConfig}etc/scram.d/%n

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines