(file) Return to rpmBuild CVS log (file) (dir) Up to [Pegasus] / pegasus / Attic

Diff for /pegasus/Attic/rpmBuild between version 1.5 and 1.6

version 1.5, 2001/12/14 10:31:06 version 1.6, 2002/02/26 12:45:17
Line 1 
Line 1 
 #!/bin/sh #!/bin/sh
 if test `whoami` != 'root'; then  if test 'whoami' != 'root'; then
   echo "You have to be root to build the pegasus rpm"   echo "You have to be root to build the pegasus rpm"
   exit    #exit
 fi fi
 # #
 if test "$PEGASUS_PLATFORM" != LINUX_IX86_GNU; then  echo "This script executes <make clean> first"
   echo "Please set PEGASUS_PLATFORM to LINUX_IX86_GNU"  read -n 1 -p "Do you want to continue ? (y/n)" retcode
   echo "either using export PEGASUS_PLATFORM=LINUX_IX86_GNU for ksh and bash"  
   echo "or set PEGASUS_PLATFORM=LINUX_IX86_GNU csh and tcsh"  if test $retcode != "y"; then
   exit;    echo "Okay, you don\'t want to execute make clean now"
     exit
 fi fi
 #  echo;
 # assume that we have been started in PEGASUS_ROOT  
 # and that the basename is pegasus  export PEGASUS_PLATFORM=LINUX_IX86_GNU
 #  if test -z $PEGASUS_HOME; then
 if test -z $PEGASUS_ROOT; then  
   echo "Please make sure that PEGASUS_ROOT points to the current"   echo "Please make sure that PEGASUS_ROOT points to the current"
   echo "location of the Pegasus sources"   echo "location of the Pegasus sources"
     read -n 1 -p "Is current directory the location of Pegasus? (y/n)" retcode
     if test $retcode != "y"; then
       echo "Okay, please set the variable first"
   exit   exit
 fi fi
 #    export PEGASUS_HOME=`pwd`
 #    echo;
 PEGASUS_BASE=`basename $PEGASUS_ROOT`  
 if test "$PEGASUS_BASE" != "pegasus-1.0"; then  
   echo "I'm going to make sure that pegasus is found in */pegasus-1.0/ "  
   cp -a $PEGASUS_ROOT $PEGASUS_ROOT/../pegasus-1.0  
   export PEGASUS_ROOT=$PEGASUS_ROOT/../pegasus-1.0  
 fi fi
 # pack the entire source, but first clean it up  
 # #
 export PEGASUS_HOME=$PEGASUS_ROOT  #
   export PEGASUS_ROOT=$PEGASUS_HOME
   
 cd $PEGASUS_HOME cd $PEGASUS_HOME
 if make clean;then if make clean;then
   # Clean up the stuff make clean forgets    echo "Sources are cleaned up"
   rm -rf repository  
   rm -rf obj  
   rm -f cgi/cgi-bin/*.so  
   echo "Sources are now cleaned up"  
 else else
   echo "Cleaning up the sources (make clean) hasn't been successful"    echo "Cleanup hasn't been successful"
   exit   exit
 fi fi
 # #
   PEGASUS_BASE=`basename $PEGASUS_ROOT`
   PEGASUS_DIR=`dirname $PEGASUS_ROOT`
   if test "$PEGASUS_BASE" != "pegasus-1.0"; then
     echo "I'm going to make sure that pegasus is found in */pegasus-1.0/ "
     #cp -a $PEGASUS_ROOT $PEGASUS_ROOT/../pegasus-1.0
     mv $PEGASUS_ROOT $PEGASUS_DIR/pegasus-1.0
     export PEGASUS_ROOT=$PEGASUS_DIR/pegasus-1.0
   fi
   # pack the entire source, but first clean it up
 # #
 # tar it and copy it into /usr/src/packages/SOURCES  # and copy it into /usr/src/packages/SOURCES
 # #
 pushd ..  #pushd ..
   cd $PEGASUS_DIR
 if tar cfz /usr/src/packages/SOURCES/pegasus-1.0.tar.gz pegasus-1.0 ;then if tar cfz /usr/src/packages/SOURCES/pegasus-1.0.tar.gz pegasus-1.0 ;then
   echo "/usr/src/packages/SOURCES/pegasus-1.0.tar.gz created"   echo "/usr/src/packages/SOURCES/pegasus-1.0.tar.gz created"
 else else
   echo "Didn't succeed in tarring"   echo "Didn't succeed in tarring"
     mv $PEGASUS_ROOT $PEGASUS_DIR/$PEGASUS_BASE
   exit   exit
 fi fi
 popd  
   mv $PEGASUS_ROOT $PEGASUS_DIR/$PEGASUS_BASE
   cd $PEGASUS_BASE
   #popd
   export PEGASUS_ROOT=$PEGASUS_DIR/$PEGASUS_BASE
 # #
 # #
 # #
 chmod +x rpm/pegasus chmod +x rpm/pegasus
 if cp rpm/pegasus-1.0.spec /usr/src/packages/SPECS/; then  if cp $PEGASUS_ROOT/rpm/pegasus-1.0.spec /usr/src/packages/SPECS/; then
   echo "Copied spec file"   echo "Copied spec file"
 else else
   echo "Spec file missing ???"   echo "Spec file missing ???"
Line 65 
Line 75 
 fi fi
 # #
 # #
 chmod +x rpm/buildincludes  #chmod +x rpm/buildincludes
 if cp rpm/buildincludes /var/tmp; then  #if cp $PEGASUS_ROOT/rpm/buildincludes /var/tmp; then
   echo "Copied buildincludes script"  #  echo "Copied buildincludes script"
 else  #else
   echo "buildincludes script missing ???"  #  echo "buildincludes script missing ???"
   exit  #  exit
 fi  #fi
 # #
 # #
 echo "Start building ...." echo "Start building ...."
   
 if rpm -ba /usr/src/packages/SPECS/pegasus-1.0.spec; then if rpm -ba /usr/src/packages/SPECS/pegasus-1.0.spec; then
   echo "Package built as /usr/src/packages/RPMS/pegasus-1.0.rpm"   echo "Package built as /usr/src/packages/RPMS/pegasus-1.0.rpm"
 else else
   echo "Build error"    echo "Build error !"
   exit  
 fi fi
 echo "Finished" echo "Finished"
   
   


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2