ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/xdaq.spec
Revision: 1.26
Committed: Fri Aug 11 17:20:58 2006 UTC (18 years, 8 months ago) by eulisse
Branch: MAIN
CVS Tags: for106, ge20061020-for106, pre-for106, for105, for104, for103, for110p3, for102, for101-take3, for101-take2, for101, forGeant481, for110p2, CMSSW_1_0_0, for110p5, for110p1, for084, for100p4, argiro-20060904-for100p4, for092, for137a_pre083_take2, for137a_pre083, ge20060825, for100p2, for100pre1, for091, for090
Changes since 1.25: +3 -3 lines
Log Message:
Include .la, .lo, and .a files.

File Contents

# User Rev Content
1 eulisse 1.8 ### RPM external xdaq 3.5
2 ratnik 1.13 Requires: zlib
3     Requires: oracle
4 eulisse 1.7 %define xdaqv %(echo %v |tr . _)
5 eulisse 1.2 %define libext so
6 eulisse 1.18 %if "%cmsplatf" == "slc3_ia32_gcc323"
7     %define installDir linux/x86
8     %endif
9    
10 eulisse 1.7 # Download from cern afs area to speed up testing:
11     #Source0: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/coretools_G_17559_V%xdaqv.tgz
12     #Source1: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/powerpack_G_28175_V1_3_1.tgz
13     #Source2: http://cmsdoc.cern.ch/Releases/XDAQ/XDAQ_%xdaqv/worksuite_G_28176_V1_4.tgz
14     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_4.tgz
16     Source2: http://switch.dl.sourceforge.net/sourceforge/xdaq/worksuite_G_28176_V1_5.tgz
17 ratnik 1.5
18 eulisse 1.7 %prep
19     %setup -T -b 0 -n TriDAS
20     %setup -D -T -b 1 -n TriDAS
21     %setup -D -T -b 2 -n TriDAS
22 eulisse 1.11 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
25 eulisse 1.7 echo " Install root in prep:" %{i} %{pkginstroot}
26 ratnik 1.1
27     %build
28     # Xdaq does not provide makeinstall, it uses "simplify" script instead to
29     # reorganize the directory structure after the build is done.
30     # Therefore build is done in the install area.
31    
32     %install
33     # Copy all code into the installation area, and build directly there:
34     cp -rp * %{i} # assuming there are no symlinks in the original source code
35     cd %{i}
36     export XDAQ_ROOT=$PWD
37     cd %{i}/daq
38 eulisse 1.2 make Set=extern
39 ratnik 1.1 make Set=coretools
40 eulisse 1.7 make Set=powerpack
41     make Set=worksuite
42 ratnik 1.13 cd tstore
43     make ORACLE_INCLUDE=$ORACLE_ROOT/include ORACLE_LIB=$ORACLE_ROOT/lib
44 ratnik 1.1 # The following structure used as defined in Xdaq "simplify" script:
45 eulisse 1.17 #cd %{i}
46     # Catch-all
47     # cp -r ./lib %{i}/lib
48     # cp -r ./bin %{i}/bin
49 ratnik 1.1 cd %{i}
50 eulisse 1.23 find daq -path *src* -type d -exec rm -rf daq/{} \;
51 eulisse 1.17 # copies all the libraries in extern in %i/lib
52 eulisse 1.20 mkdir -p %{i}/lib/linux/x86
53     mkdir -p %{i}/bin/linux/x86
54 eulisse 1.26 (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 eulisse 1.22 (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 eulisse 1.17
62     #links them back to lib and bin
63 eulisse 1.22 #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 \;
67 ratnik 1.1
68     # Libraries from extern (not found cause they are symlinks)
69 eulisse 1.3
70 eulisse 1.22 #find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \;
71 eulisse 1.11 perl -p -i -e "s|^#!.*make|#!/usr/bin/env make|" %{i}/daq/extern/slp/openslp-1.2.0/debian/rules
72 eulisse 1.12 %post
73 eulisse 1.26 #find $RPM_INSTALL_PREFIX/%pkgrel -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g"
74 eulisse 1.12 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