7 sage 1.1 if test "$PEGASUS_PLATFORM" != LINUX_IX86_GNU; then
8 echo "Please set PEGASUS_PLATFORM to LINUX_IX86_GNU"
9 echo "either using export PEGASUS_PLATFORM=LINUX_IX86_GNU for ksh and bash"
10 echo "or set PEGASUS_PLATFORM=LINUX_IX86_GNU csh and tcsh"
11 exit;
12 fi
13 #
14 # assume that we have been started in PEGASUS_ROOT
15 # and that the basename is pegasus
16 #
17 if test -z $PEGASUS_ROOT; then
18 echo "Please make sure that PEGASUS_ROOT points to the current"
19 echo "location of the Pegasus sources"
20 exit
21 fi
22 #
23 PEGASUS_BASE=`basename $PEGASUS_ROOT`
24 if test "$PEGASUS_BASE" != "pegasus-1.0"; then
25 echo "I'm going to make sure that pegasus is found in */pegasus-1.0/ "
26 cp -a $PEGASUS_ROOT $PEGASUS_ROOT/../pegasus-1.0
27 export PEGASUS_ROOT=$PEGASUS_ROOT/../pegasus-1.0
28 sage 1.1 fi
29 # pack the entire source, but first clean it up
30 #
31 export PEGASUS_HOME=$PEGASUS_ROOT
32 cd $PEGASUS_HOME
33 if make clean;then
34 # Clean up the stuff make clean forgets
35 rm -rf repository
36 rm -rf obj
37 rm -f cgi/cgi-bin/*.so
38 echo "Sources are now cleaned up"
39 else
40 echo "Cleaning up the sources (make clean) hasn't been successful"
41 exit
42 fi
43 #
44 #
45 # tar it and copy it into /usr/src/packages/SOURCES
46 #
47 pushd ..
48 if tar cfz /usr/src/packages/SOURCES/pegasus-1.0.tar.gz pegasus-1.0 ;then
49 sage 1.1 echo "/usr/src/packages/SOURCES/pegasus-1.0.tar.gz created"
50 else
51 echo "Didn't succeed in tarring"
52 exit
53 fi
54 popd
55 #
56 #
57 #
58 chmod +x rpm/pegasus
59 if cp rpm/pegasus-1.0.spec /usr/src/packages/SPECS/; then
60 echo "Copied spec file"
61 else
62 echo "Spec file missing ???"
63 exit
64 fi
65 #
66 #
67 #
68 echo "Start building ...."
69 if rpm -ba /usr/src/packages/SPECS/pegasus-1.0.spec; then
70 sage 1.1 echo "Package built as /usr/src/packages/RPMS/pegasus-1.0.rpm"
71 else
72 echo "Build error"
73 exit
74 fi
75 echo "Finished"
|