#!/bin/sh PN=gkrellweather PV=0.2.7 ARCH=i386rob BUILD=2 DOCS="COPY* ChangeLog README" CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-$PN if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi # Explode the package framework: cd $PKG explodepkg $CWD/_$PN.tar.gz cd $TMP tar xvfz $CWD/$PN-$PV.tar.gz cd $PN-$PV echo "Building $PN-$PV ..." # Make CFLAGS="-O2 -I/opt/gnome/include" LDFLAGS=-s make || exit 1 # Install files install -c -s -m 644 gkrellweather.so $PKG/opt/gnome/lib/gkrellm/plugins install -c -m 755 GrabWeather $PKG/usr/X11R6/bin # Copy the docs mkdir -p $PKG/usr/doc/$PN-$PV cp -a $DOCS $PKG/usr/doc/$PN-$PV chmod 644 $PKG/usr/doc/$PN-$PV/* chown -R root.root $PKG # Build the package: cd $PKG tar czvf $TMP/$PN-${PV}-${ARCH}-${BUILD}.tgz . # Warn of zero-length files: for file in `find . -type f -print` ; do if [ "`filesize $file`" = "0" ]; then echo "WARNING: zero length file $file" fi if [ "`filesize $file`" = "20" ]; then echo "WARNING: possible empty gzipped file $file" fi done # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PN-$PV rm -rf $PKG fi