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 . _) |
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 |
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 |
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 |
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} |
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/{} \; |
128 |
< |
cd %{i} |
129 |
< |
fi |
74 |
< |
if [ -d daq/$subdir/html ]; then |
75 |
< |
cd daq/$subdir/html |
76 |
< |
find . -name "*.*" -exec install -m 655 -D {} %{i}/htdocs/$subdir/html/{} \; |
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 -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 |