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

File: [Pegasus] / pegasus / Attic / rpmBuild (download)
Revision: 1.7, Fri Oct 27 18:12:21 2006 UTC (17 years, 6 months ago) by denise.eckstein
Branch: MAIN
CVS Tags: TASK-PEP362_RestfulService-merged_out_from_trunk, TASK-PEP348_SCMO-merged_out_from_trunk, TASK-PEP317_pullop-merged_out_from_trunk, TASK-PEP317_pullop-merged_in_to_trunk, TASK-PEP311_WSMan-root, TASK-PEP311_WSMan-branch, HPUX_TEST, HEAD
Changes since 1.6: +0 -0 lines
FILE REMOVED
BUG#:5768
TITLE: RPM Script File Cleanup Needed

DESCRIPTION: Removed a number of unused and out-of-date RPM scripts files.

#!/bin/sh
if test 'whoami' != 'root'; then
  echo "You have to be root to build the pegasus rpm"
  #exit
fi
#
echo "This script executes <make clean> first"
read -n 1 -p "Do you want to continue ? (y/n)" retcode

if test $retcode != "y"; then
  echo "Okay, you don\'t want to execute make clean now"
  exit
fi
echo;

export PEGASUS_PLATFORM=LINUX_IX86_GNU
if test -z $PEGASUS_HOME; then
  echo "Please make sure that PEGASUS_ROOT points to the current"
  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
  fi
  export PEGASUS_HOME=`pwd`
  echo;
fi
#
#
export PEGASUS_ROOT=$PEGASUS_HOME

cd $PEGASUS_HOME
if make clean; then
  echo "Sources are cleaned up"
else 
  echo "Cleanup hasn't been successful"
  exit 
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
#
# and copy it into /usr/src/packages/SOURCES
#
#pushd ..
cd $PEGASUS_DIR
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"
else
  echo "Didn't succeed in tarring"
  mv $PEGASUS_ROOT $PEGASUS_DIR/$PEGASUS_BASE
  exit
fi

mv $PEGASUS_ROOT $PEGASUS_DIR/$PEGASUS_BASE
cd $PEGASUS_BASE
#popd
export PEGASUS_ROOT=$PEGASUS_DIR/$PEGASUS_BASE
#
#
#
chmod +x rpm/pegasus
if cp $PEGASUS_ROOT/rpm/pegasus-1.0.spec /usr/src/packages/SPECS/; then
  echo "Copied spec file"
else
  echo "Spec file missing ???"
  exit
fi
#
#
#chmod +x rpm/buildincludes
#if cp $PEGASUS_ROOT/rpm/buildincludes /var/tmp; then
#  echo "Copied buildincludes script"
#else
#  echo "buildincludes script missing ???"
#  exit
#fi
#
#
echo "Start building ...."

if rpm -ba /usr/src/packages/SPECS/pegasus-1.0.spec; then
  echo "Package built as /usr/src/packages/RPMS/pegasus-1.0.rpm"
else
  echo "Build error !"
fi
echo "Finished"



No CVS admin address has been configured
Powered by
ViewCVS 0.9.2