28 sage 1.1 PEGASUS_BASE=`basename $PEGASUS_ROOT`
29 if test "$PEGASUS_BASE" != "pegasus-1.0"; then
30 echo "I'm going to make sure that pegasus is found in */pegasus-1.0/ "
31 cp -a $PEGASUS_ROOT $PEGASUS_ROOT/../pegasus-1.0
32 export PEGASUS_ROOT=$PEGASUS_ROOT/../pegasus-1.0
33 fi
34 # pack the entire source, but first clean it up
35 #
36 export PEGASUS_HOME=$PEGASUS_ROOT
37 cd $PEGASUS_HOME
38 if make clean;then
39 # Clean up the stuff make clean forgets
40 rm -rf repository
41 rm -rf obj
42 rm -f cgi/cgi-bin/*.so
43 echo "Sources are now cleaned up"
44 else
45 echo "Cleaning up the sources (make clean) hasn't been successful"
46 exit
47 fi
48 #
49 sage 1.1 #
50 # tar it and copy it into /usr/src/packages/SOURCES
51 #
52 pushd ..
53 if tar cfz /usr/src/packages/SOURCES/pegasus-1.0.tar.gz pegasus-1.0 ;then
54 echo "/usr/src/packages/SOURCES/pegasus-1.0.tar.gz created"
55 else
56 echo "Didn't succeed in tarring"
57 exit
58 fi
59 popd
60 #
61 #
62 #
63 chmod +x rpm/pegasus
64 if cp rpm/pegasus-1.0.spec /usr/src/packages/SPECS/; then
65 echo "Copied spec file"
66 else
67 echo "Spec file missing ???"
68 exit
69 fi
70 sage 1.1 #
71 #
72 #
73 echo "Start building ...."
74 if rpm -ba /usr/src/packages/SPECS/pegasus-1.0.spec; then
75 echo "Package built as /usr/src/packages/RPMS/pegasus-1.0.rpm"
76 else
77 echo "Build error"
78 exit
79 fi
80 echo "Finished"
|