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.2 by eulisse, Fri Apr 14 21:59:43 2006 UTC vs.
Revision 1.80 by eulisse, Thu Dec 9 20:39:58 2010 UTC

# Line 1 | Line 1
1 < ### RPM external xdaq 3.4
2 < %define xdaqv %(echo %v |tr . _)
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 < # Download from cern afs area to speed up testing:
7 < Source0: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/coretools_G_17559_V%xdaqv.tgz
8 < Source1: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/powerpack_G_28175_V1_3_1.tgz
9 < Source2: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/worksuite_G_28176_V1_4.tgz
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
11 < %setup -D -T -b 1 -n TriDAS
12 < %setup -D -T -b 2 -n TriDAS
23 > %setup -T -b 0 -n xdaq
24  
25 < echo " Install root in prep:" %{i}    %{pkginstroot}
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 20 | 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 < make Set=extern
73 < make Set=coretools
74 < make Set=powerpack
75 < make Set=worksuite
72 >
73 > export MIMETIC_PREFIX=$MIMETIC_ROOT
74 > export XERCES_PREFIX=$XERCES_C_ROOT
75 > export UUID_LIB_PREFIX=$UUID_ROOT/lib
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 < mkdir -p %{i}/lib
108 < mkdir -p %{i}/bin
109 < # Catch-all
110 < find .  -type f ! -path "./lib/*.%{libext}" -name "*.%{libext}" -exec mv {}  %{i}/lib \;
111 < find .  -type f ! -path "./bin/*.exe" -name "*.exe" -exec mv {} %{i}/bin \;
107 > mv x86*/lib .
108 > mv x86*/bin .
109 > 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 > 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 >      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
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 < cp -dL daq/extern/*/linuxx86/lib/* %{i}/lib
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 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines