slackbuilds/xap/UNUSED/key-mon/key-mon.SlackBuild

60 lines
1.1 KiB
Text
Raw Normal View History

2010-06-18 08:00:25 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=hg$(date +%Y.%m.%d_%H.%M)
2010-06-18 08:00:25 +02:00
BUILD=1
2010-06-18 08:00:25 +02:00
ARCH=$(uname -m)
HOME=/home/cycojesus
TAG=cyco
OUTPUT=/tmp
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
2010-06-18 08:00:25 +02:00
REPOSITORIES=$HOME/projets/packages/repositories
rm -fr $PKG $TMP/$PRGNAM-$VERSION
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
[ -e $PKG ] && rm -fr $PKG
( cd $TMP
if [ -e $CWD/$PRGNAM-$VERSION.tar.?z* ]; then
tar xf $CWD/$PRGNAM-$VERSION.tar.?z*
else
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
hg clone https://$PRGNAM.googlecode.com/hg/ $REPOSITORIES/$PRGNAM
else
( cd $REPOSITORIES/$PRGNAM
hg pull -u
)
fi
cp -R $REPOSITORIES/$PRGNAM $TMP/$PRGNAM-$VERSION
fi
)
( cd $TMP/$PRGNAM-$VERSION
python setup.py install --root $PKG
mkdir -p $PKG/install
cat <<EOF > $PKG/install
$PRGNAM: $PRGNAM (Keyboard monitor)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://code.google.com/p/key-mon/
EOF
)
( cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz
2010-06-18 08:00:25 +02:00
)