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.73 by muzaffar, Fri Feb 5 16:31:38 2010 UTC vs.
Revision 1.80 by eulisse, Thu Dec 9 20:39:58 2010 UTC

# Line 1 | Line 1
1   ### RPM external xdaq VR16021
2 ## BUILDIF case $(uname):$(uname -p) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;;  Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac
2  
3   Requires: zlib mimetic xerces-c uuid sqlite
4   %define xdaqv %(echo %v | cut -f1 -d- | tr . _)
# Line 10 | Line 9 | Source: svn://svn.cern.ch/reps/cmsos/rel
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 xdaq
# Line 19 | Line 25 | Provides: /bin/awk
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 27 | Line 63 | Provides: /bin/awk
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
# Line 38 | Line 76 | export UUID_LIB_PREFIX=$UUID_ROOT/lib
76   export SQLITE_PREFIX=$SQLITE_ROOT
77   export SEARCH_PATH=$PATH
78  
79 < make CPPDEFINES=linux Set=extern_coretools install
80 < make CPPDEFINES=linux Set=coretools install
81 < make CPPDEFINES=linux Set=extern_powerpack install
82 < make CPPDEFINES=linux Set=powerpack install
83 < make CPPDEFINES=linux Set=general_worksuite install
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}
# Line 52 | Line 110 | mv x86*/include .
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 <
113 > mkdir -p include/macosx
114   mkdir -p htdocs
115  
116 < 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}'`
117 < do
118 <        mkdir -p %{i}/htdocs/$subdir/{images,xml,html}
119 <        echo $subdir
120 <        if [ -d daq/$subdir/xml ]; then
121 <                cd daq/$subdir/xml
122 <                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/xml/{} \;
123 <                cd %{i}
124 <        fi      
125 <        if [ -d daq/$subdir/images ]; then
126 <                cd daq/$subdir/images
127 <                find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/images/{} \;
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 <        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
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 -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 -p etc
145   mv daq/xdaq/etc/default.profile etc/
146 < rm -fr daq
146 > rm -fr daq
147   rm -fr CVS
148   rm -fr x86*
149   rm -fR java
# Line 94 | Line 156 | rm -f %{i}/lib/lib*.a %{i}/lib/lib*.la
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  
97 # SCRAM ToolBox toolfile
98 mkdir -p %i/etc/scram.d
99 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml
100  <tool name="XDAQ" version="%v">
101    <info url="http://home.cern.ch/xdaq"/>
102    <lib name="toolbox"/>
103    <lib name="xdaq"/>
104    <lib name="config"/>
105    <lib name="xoap"/>
106    <lib name="xgi"/>
107    <lib name="xdata"/>
108    <lib name="cgicc"/>
109    <lib name="log4cplus"/>
110    <lib name="xcept"/>
111    <lib name="logudpappender"/>
112    <lib name="peer"/>
113    <lib name="logxmlappender"/>
114    <lib name="asyncresolv"/>
115    <lib name="ptfifo"/>
116    <lib name="pthttp"/>
117    <lib name="pttcp"/>
118    <lib name="i2outils"/>
119    <lib name="xdaq2rc"/>
120    <lib name="xoapfilter"/>
121    <lib name="xalan-c"/>
122    <lib name="xalanMsg"/>
123    <lib name="wsaddressing"/>
124    <lib name="wsclientsubscriber"/>
125    <lib name="wseventing"/>
126    <lib name="wsserviceeventing"/>
127    <client>
128      <environment name="XDAQ_BASE" default="%i"/>
129      <environment name="LIBDIR" default="$XDAQ_BASE/lib"/>
130      <environment name="BINDIR" default="$XDAQ_BASE/bin"/>
131      <environment name="INCLUDE" default="$XDAQ_BASE/include"/>
132      <environment name="INCLUDE" default="$XDAQ_BASE/include/linux"/>
133    </client>
134    <flags cppdefines="SOAP__ LITTLE_ENDIAN__"/>
135    <flags cppdefines="linux"/>
136    <runtime name="XDAQ_OS" value="linux"/>
137    <runtime name="XDAQ_PLATFORM" value="x86"/>
138    <runtime name="PATH" value="$BINDIR" type="path"/>
139    <runtime name="XDAQ_ROOT" value="$XDAQ_BASE"/>
140    <runtime name="XDAQ_DOCUMENT_ROOT" value="$XDAQ_BASE/htdocs"/>
141    <use name="xerces-c"/>
142    <use name="sockets"/>
143    <use name="mimetic"/>
144    <use name="uuid"/>
145  </tool>
146 EOF_TOOLFILE
147
148 cat << \EOF_TOOLFILE >%i/etc/scram.d/xdaqheader.xml
149  <tool name="XDAQHEADER" version="%v">
150    <info url="http://home.cern.ch/xdaq"/>
151    <client>
152      <environment name="XDAQHEADER_BASE" default="%i"/>
153      <environment name="INCLUDE" default="$XDAQHEADER_BASE/include"/>
154    </client>
155  </tool>
156 EOF_TOOLFILE
157
158 %post
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.xml
161 %{relocateConfig}etc/scram.d/xdaqheader.xml
162

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines