ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/dpm.spec
Revision: 1.7
Committed: Tue Oct 9 04:54:46 2007 UTC (17 years, 6 months ago) by dlange
Branch: MAIN
CVS Tags: CMSSW_1_7_7, dl080227for176, CMSSW_1_7_5, CMSSW_1_7_5_g491, dl080111, ge20080109-webconddb, ge20080109-sitedb, CMSSW_1_7_4, CMSSW_1_7_3_g490p1, dl071212t2, dl071212, CMSSW_1_7_3, CMSSW_1_7_2, CMSSW_1_7_1, nr071120_fwlite170_1, CMSSW_1_7_0, CMSSW_1_7_0_pre13, dl071114, ap20071113, CMSSW_1_7_0_pre12, CMSSW_1_7_0_pre11, nr071105a, CMSSW_1_7_0_pre10, CMSSW_1_7_0_pre9, CMSSW_1_7_0_pre8, CMSSW_1_7_0_pre7, dl071028, dl071024, nr071023_fwlite170p6, forTony_001, pe20071021-170p6-zlib, dl071021t2, dl071021, pe20071021a-ports, dl071020, CMSSW_1_7_0_pre6, pe20071015-xrootd, pe20071014-ports, dl071014, dl071010t2, dl071010, dl071009t2, dl071009, dl070909
Changes since 1.6: +1 -1 lines
Log Message:
another round of 170pre6

File Contents

# User Rev Content
1 dlange 1.7 ### RPM external dpm 1.6.5-5-CMS8
2 muzaffar 1.1 ## BUILDIF case $(uname):$(uname -p) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) true ;; esac
3    
4     %define baseVersion %realversion
5 muzaffar 1.2 %define patchLevel %(echo %v | cut -d- -f2)
6     %define downloadv %{realversion}-%{patchLevel}
7     %define dpmarch %(echo %cmsplatf | cut -d_ -f1)
8 muzaffar 1.1
9 muzaffar 1.2 Source: http://eticssoft.web.cern.ch/eticssoft/repository/org.glite/LCG-DM/%{realversion}/src/DPM-%{downloadv}sec.%{dpmarch}.src.rpm
10 muzaffar 1.1
11 elmer 1.5 %define cpu %(echo %cmsplatf | cut -d_ -f2)
12     %if "%cpu" != "amd64"
13     %define libsuffix %{nil}
14     %else
15     %define libsuffix ()(64bit)
16     %endif
17     Provides: libdpm.so%{libsuffix}
18    
19 muzaffar 1.1 %prep
20 muzaffar 1.2 rm -f %_builddir/DPM-%{realversion}.src.tar.gz
21     rpm2cpio %{_sourcedir}/DPM-%{downloadv}sec.%{dpmarch}.src.rpm | cpio -ivd DPM-%{realversion}.src.tar.gz
22     cd %_builddir ; rm -rf DPM-%{realversion}; tar -xzvf DPM-%{realversion}.src.tar.gz
23    
24 muzaffar 1.1 %build
25 muzaffar 1.2 cd DPM-%{realversion}
26 muzaffar 1.1 cp h/patchlevel.in h/patchlevel.h
27     perl -pi -e "s!__PATCHLEVEL__!%patchLevel!;s!__BASEVERSION__!\"%baseVersion\"!;s!__TIMESTAMP__!%(date +%%s)!" h/patchlevel.h
28     perl -pi -e 's|ld\s+\$\(|ld -m elf_i386 \$\(|' shlib/Imakefile
29    
30 elmer 1.4 for this in BuildDLI BuildDPMServer BuildNameServerDaemon BuildNameServerLibrary BuildRfioServer \
31 muzaffar 1.1 BuildSRMv1Server BuildSRMv2Server BuildSRMv2_2Server BuildTest ; do
32     perl -pi -e "s/\s+$this\s+YES/ $this\tNO/g" config/site.def
33     done
34    
35     for this in BuildDPMClient BuildInterfaces BuildRfioClient; do
36     perl -pi -e "s/\s+$this\s+NO/ $this\tYES/g" config/site.def
37     done
38 elmer 1.4 for this in Accounting HasNroff UseCupv UseKRB4 UseKRB5 UseMySQL UseOracle UseVirtualIds UseVOMS ; do
39 muzaffar 1.1 perl -pi -e "s/\s+$this\s+YES/ $this\tNO/g" config/site.def
40     done
41     for this in SecMakeStaticLibrary BuildSecureRfio BuildSecureCns BuildSecureDpm ; do
42     perl -pi -e "s/\s+$this\s+YES/ $this\tNO/g" config/site.def
43     done
44    
45     mkdir -p %i/lib %i/include/dpm
46    
47     ./configure
48     cd shlib; make
49    
50     %install
51 muzaffar 1.2 cd DPM-%{realversion}
52 muzaffar 1.1 cp ./shlib/lib%n.so %i/lib/lib%n.so.%realversion
53     cp ./h/*.h %i/include/dpm
54     ln -s lib%n.so.%realversion %i/lib/lib%n.so
55    
56     # SCRAM ToolBox toolfile
57     mkdir -p %i/etc/scram.d
58     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
59     <doc type=BuildSystem::ToolDoc version=1.0>
60     <Tool name=%n version=%v>
61     <lib name=dpm>
62     <Client>
63     <Environment name=DPM_BASE default="%i"></Environment>
64     <Environment name=INCLUDE default="$DPM_BASE/include"></Environment>
65     <Environment name=LIBDIR default="$DPM_BASE/lib"></Environment>
66     </Client>
67     </Tool>
68     EOF_TOOLFILE
69    
70     %post
71     %{relocateConfig}etc/scram.d/%n