Pwd built-in added
[k8jam.git] / BuildSlackPkg
blob72e14172919381fc56ce99b3be00930e667898a2
1 #!/bin/sh
2 # Heavily based on the Slackware 12.0 SlackBuild
3 # SlackBuild by gallows ~at~ tiscali ~dot~ it
5 NAME=kjam
6 VERSION=2.5.3
7 ARCH=i686
8 BUILD=1k8
9 #TMP=./tmp
10 #PKG=$TMP/package-$NAME
11 CWD=`pwd`
13 TMP=$CWD/tmp
14 PKG=$TMP/pkg
16 PACK=$NAME-$VERSION-$ARCH-$BUILD.tgz
18 [ -e $PKG ] && rm -rf $PKG
19 [ -e $TMP/$NAME-$VERSION ] && rm -rf $TMP/$NAME-$VERSION
21 jam clean
22 jam || exit 1
24 mkdir -p -m 755 $PKG/usr/doc/$NAME-$VERSION
26 cp -a RELNOTES CHANGES README README.ORG *.html Jambase $PKG/usr/doc/$NAME-$VERSION/
28 cd $PKG
30 chmod 644 $PKG/usr/doc/$NAME-$VERSION/*
32 mkdir -p $PKG/usr/bin
34 cp -a $CWD/bin.unix/jam $PKG/usr/bin
35 cp -a $CWD/bin.unix/mkjambase $PKG/usr/bin
37 chown -R root:root .
39 strip -s $PKG/usr/bin/*
40 chmod 755 $PKG/usr/bin/*
42 mkdir $PKG/install
43 cat $CWD/slack-desc > $PKG/install/slack-desc
45 echo -ne "\nmaking $NAME package.. "
46 cd $PKG
47 # ??? requiredbuilder -v -y -s $CWD $PKG
48 rm -f $CWD/slack/$PACK &>/dev/null
49 makepkg -c n -l y $CWD/slack/$PACK &>/dev/null
50 echo "done"
52 echo -e "cleaning up... "
53 cd $CWD
54 jam clean
55 rm -rf $TMP/$NAME-$VERSION
56 rm -rf $PKG
57 echo "done"
59 ## EOF ##