#!/bin/sh # # $Id: umix.build,v 1.6 2003/08/30 15:33:57 sakari Exp $ # # Slackware package build script for Umix, based on SlackBuild # that comes with joe in Slackware 8.0 # # Copyright (C) 2002 Sakari Lehtonen # # Set initial variables: VER="1.0.2" CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-umix 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 echo "+============+" echo "| umix-$VER |" echo "+============+" cd $TMP tar xzvf $CWD/umix-$VER.tar.gz cd umix-$VER sh configure --prefix=/usr make make prefix=$PKG/usr install mkdir -p $PKG/usr/doc/umix-$VER cp -a ChangeLog NEWS README TODO COPYING $PKG/usr/doc/umix-$VER strip $PKG/usr/bin/umix gzip -9 $PKG/usr/man/man1/umix.1 # Build the package: cd $PKG tar czvf $TMP/umix.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/umix-$VER rm -rf $PKG fi