ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/dbs-light.spec
(Generate patch)

Comparing COMP/CMSDIST/dbs-light.spec (file contents):
Revision 1.6 by valya, Sat Sep 22 16:55:01 2007 UTC vs.
Revision 1.7 by valya, Mon Sep 24 13:44:03 2007 UTC

# Line 8 | Line 8
8   %define cvstag %v
9   Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=DBS&export=DBS&tag=-r%{cvstag}&output=/dbs-light.tar.gz
10   #Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=DBS/{Servers/JavaServer,Clients/Python,Schema/NeXtGen/DBS-NeXtGen-SQLite_DEPLOYABLE.sql}&export=DBS&tag=-r%{cvstag}&output=/dbs-light.tar.gz
11 < Requires: python openssl apache-ant sqlite
11 > Requires: python openssl apache-ant sqlite java-jdk
12   #Requires: apache-ant mysql oracle apache-tomcat
13  
14   %prep
15   %setup -n DBS
16 +
17   %build
18   echo "PWD=$PWD"
19 + env | grep JAVA
20 + export JAVA_HOME=$JAVA_JDK_ROOT
21   # server
22   cd Servers/JavaServer
23   echo "PWD=$PWD"
24 < ant --noconfig dist
24 > ant --noconfig jar
25   cd ../../
26   # client
27   (make DBSHOME=%_builddir/DBS/Clients/Python )
# Line 46 | Line 49 | mkdir -p %{i}/etc/profile.d
49   echo "source $PYTHON_ROOT/etc/profile.d/init.sh"; \
50   echo "source $SQLITE_ROOT/etc/profile.d/init.sh"; \
51   echo "source $APACHE_ANT_ROOT/etc/profile.d/init.sh"; \
52 + echo "source $JAVA_JDK_ROOT/etc/profile.d/init.sh"; \
53   echo "source $OPENSSL_ROOT/etc/profile.d/init.sh"; \
54   echo -e "export PYTHONPATH=\044PYTHONPATH:\044DBS_LIGHT_ROOT/Clients/Python:\044DBS_LIGHT_ROOT/Clients/Python/DBSAPI"; \
55   echo -e "export DBS_CLIENT_CONFIG=\044DBS_LIGHT_ROOT/Clients/Python/DBSAPI/dbs.config"; \
56   echo -e "export DBS_SERVER_CONFIG=\044DBS_LIGHT_ROOT/Servers/JavaServer/etc/context.xml"; \
57 + echo -e "export JAVA_HOME=\044JAVA_JDK_ROOT"; \
58   ) > %{i}/etc/profile.d/dependencies-setup.sh
59  
60   (echo "#!/bin/tcsh"; \
61   echo "source $PYTHON_ROOT/etc/profile.d/init.csh"; \
62   echo "source $SQLITE_ROOT/etc/profile.d/init.csh"; \
63   echo "source $APACHE_ANT_ROOT/etc/profile.d/init.csh"; \
64 + echo "source $JAVA_JDK_ROOT/etc/profile.d/init.csh"; \
65   echo "source $OPENSSL_ROOT/etc/profile.d/init.csh"; \
66   echo -e "setenv PYTHONPATH \044PYTHONPATH:\044DBS_LIGHT_ROOT/Clients/Python:\044DBS_LIGHT_ROOT/Clients/Python/DBSAPI"; \
67   echo -e "setenv DBS_CLIENT_CONFIG \044DBS_LIGHT_ROOT/Clients/Python/DBSAPI/dbs.config"; \
68   echo -e "setenv DBS_SERVER_CONFIG \044DBS_LIGHT_ROOT/Servers/JavaServer/etc/context.xml"; \
69 + echo -e "setenv JAVA_HOME \044JAVA_JDK_ROOT"; \
70   ) > %{i}/etc/profile.d/dependencies-setup.csh
71  
72   # compile server code
73 < cd Servers/JavaServer
74 < ant --noconfig jar
75 < ls -l $PWD
76 < find . -name "*.jar"
77 < cd ../../
73 > #cd Servers/JavaServer
74 > #ant --noconfig jar
75 > #ls -l $PWD
76 > #find . -name "*.jar"
77 > #cd ../../
78   cp -r Servers/JavaServer/* %{i}/Servers/JavaServer
79  
80   %post
# Line 89 | Line 96 | sed "s/DBSHOME/#DBSHOME/g" |
96   sed "s/JAVAHOME/#JAVAHOME/g" |
97   sed "s/MODE=POST/#MODE=POST/g" > \
98      $RPM_INSTALL_PREFIX/%{pkgrel}/Clients/Python/DBSAPI/dbs.config.tmp
99 +
100 + #if [ -z $JAVA_HOME ]; then
101 + #   echo "########################## IMPORTANT ##############################"
102 + #   echo "# In order to install DBS code you MUST have JAVA on your machine #"
103 + #   echo "# DBS code relies on JAVA version 1.5.0_10 and above              #"
104 + #   echo "# Please install JAVA and setup JAVA_HOME environtment and re-run #"
105 + #   echo "###################################################################"
106 + #   exit 1
107 + #fi
108 +
109   cat >> $RPM_INSTALL_PREFIX/%{pkgrel}/Clients/Python/DBSAPI/dbs.config.tmp << EOF
110   # RPM AUTO-CONFIG FOR STANDALONE MODE
111   MODE=EXEC
# Line 118 | Line 135 | cat > $RPM_INSTALL_PREFIX/%{pkgrel}/Serv
135   EOF
136  
137   # obsolete code for reference, since it demonstrates how to do post-install compilation
138 + # Until we will ship proper version of JAVA in CMS RPMs I need this piece
139 + # to install jar file under local site. Compile using local JAVA.
140   #cd $RPM_INSTALL_PREFIX/%{pkgrel}/Servers/JavaServer/
141   #ant --noconfig jar
142   #ls -l $PWD
143   #find . -name "*.jar"
125 #find $RPM_INSTALL_PREFIX/%{pkgrel} -name "*.jar"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines