slackbuilds/xap/gorilla/gorilla.SlackBuild
2014-02-14 08:27:35 +01:00

63 lines
1.3 KiB
Bash
Executable file

#!/bin/sh -e
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +%Y.%m.%d_%H.%M)
BUILD=1
ARCH=noarch #$(uname -m)
HOME=/home/cycojesus
TAG=cyco
OUTPUT=/tmp
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
PREFIX=/usr
REPOSITORIES=/home/installs/SlackBuilds/repositories/
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $TMP
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
[ -e $PKG ] && rm -fr $PKG
cd $TMP
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
git clone https://github.com/zdia/gorilla.git $REPOSITORIES/$PRGNAM
else
( cd $REPOSITORIES/$PRGNAM
git pull
)
fi
cp -R $REPOSITORIES/$PRGNAM $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
# don't hardcode version
sed -i 's|tclsh8.5|tclsh|g' $(ag -l tclsh8\\\.5)
mkdir -p $PKG$PREFIX/{bin,doc/$PRGNAM,libexec}
mv sources $PKG$PREFIX/libexec/$PRGNAM
( cd $PKG$PREFIX/bin
ln -s ..//libexec/$PRGNAM/gorilla.tcl $PRGNAM
)
mv * $PKG$PREFIX/doc/$PRGNAM
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (passwordsafe compatible graphical manager)
$PRGNAM:
$PRGNAM: Password Gorilla manages passwords
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://github.com/zdia/gorilla
EOF
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz