[deep-devel] DeepBuild

  • From: deep <deep@xxxxxxxxxxxx>
  • To: deep-devel@xxxxxxxxxxxxx
  • Date: Wed, 20 Apr 2005 11:09:48 +0300

#!/bin/sh

NAME=${NAME:-`basename $0 .DeepBuild`}
TMP=${TMP:-"/tmp"}
CWD=`pwd`
PKG=$TMP/package-$NAME

VERSION=${VERSION:-2.8}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}ds

PATCH=""

if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2"
fi

cd $TMP
rm -rf $NAME-$VERSION
rm -rf ./package-$NAME
mkdir -p $PKG
tar xjvf $CWD/$NAME-$VERSION.tar.bz2
cd $NAME-$VERSION

if [ ! $PATCH = "" ]; then
   zcat $CWD/$PATCH | patch -p1 --verbose --backup
fi

chown -R root.root .

CFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr \
            --without-gtk1
make
make install DESTDIR=$PKG
strip $PKG/usr/bin/*

chown -R root.bin $PKG/usr/bin
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a \
  ABOUT-NLS AUTHORS BUGS COPYING INSTALL NEWS README TODO \
  $PKG/usr/doc/$NAME-$VERSION
# More fluff, doesn't deserve mainsteam placement
gzip -9 $PKG/usr/man/man?/*
mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
makepkg -l y -c n ../$NAME-$VERSION-$ARCH-$BUILD.tgz
cat $CWD/slack-desc | grep "^${NAME}:" > 
$TMP/$NAME-$VERSION-$ARCH-$BUILD.txt


Other related posts: