#!/bin/sh
pwd=`pwd`
builddir=`basename $pwd`
./configure --prefix=/usr
# Really ugly stuff to build a CHANGES file from the .spec file
echo -n "Building the CHANGES file: "
echo "<HTML><HEAD></HEAD><BODY><PRE>" > CHANGES
true="no"
cat logtool.spec |
while read line ; do
if [ "$line" = "%changelog" ] ; then
true="yes"
fi
if [ "$true" = "yes" ] ; then
echo "$line" >> CHANGES
fi
done
echo "done"
exit 0
# Clean up the source tree of any old cruft
echo -n "Cleaning up prior to build: "
make clean
# Configure for a default build
echo -n "Configuring for default build: "
./configure
# Make a tarball
cd ../
echo -n "Building tarball: "
tar -zcf $builddir.tar.gz $builddir
echo "done"
# Build RPM's
echo -n "Building src and i386 RPM's: "
rpm -ta $builddir.tar.gz
echo "done"
cd -
# This is my little script to upload it to the webserver
# if [ -x ../putlt ] ; then
# ../putlt
# fi
syntax highlighted by Code2HTML, v. 0.9.1