59 lines
1.1 KiB
Text
59 lines
1.1 KiB
Text
|
#!/bin/sh
|
||
|
|
||
|
CWD=$(pwd)
|
||
|
|
||
|
PRGNAM=$(basename $CWD)
|
||
|
VERSION=$(date +%Y.%m.%d_%H.%M)
|
||
|
BUILD=1
|
||
|
|
||
|
ARCH=noarch
|
||
|
|
||
|
REPOSITORIES=/home/installs/SlackBuilds/repositories
|
||
|
|
||
|
TAG=cyco
|
||
|
TMP=/tmp/$TAG
|
||
|
PKG=$TMP/pkg-$PRGNAM
|
||
|
OUTPUT=/tmp
|
||
|
|
||
|
PREFIX=/usr
|
||
|
|
||
|
# cleaning
|
||
|
rm -fr $PKG
|
||
|
|
||
|
# get sources
|
||
|
[ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES
|
||
|
( cd $REPOSITORIES
|
||
|
if [ -e $REPOSITORIES/$PRGNAM ] ; then
|
||
|
( cd $REPOSITORIES/$PRGNAM
|
||
|
git pull
|
||
|
)
|
||
|
else
|
||
|
git clone https://github.com/shutterstock/rickshaw $REPOSITORIES/$PRGNAM
|
||
|
fi
|
||
|
)
|
||
|
|
||
|
mkdir -p $PKG/srv/www/htdocs
|
||
|
cp -R $REPOSITORIES/$PRGNAM $PKG/srv/www/htdocs/
|
||
|
find $PKG/srv/www/htdocs -name \.git\* -exec rm -fr {} \;
|
||
|
|
||
|
( cd $PKG
|
||
|
mkdir -p install
|
||
|
cat <<EOF > install/slack-desc
|
||
|
$PRGNAM: $PRGNAM (JavaScript toolkit for creating interactive real-time graphs)
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: Rickshaw is a JavaScript toolkit for creating interactive real-time graphs.
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: https://github.com/shutterstock/rickshaw
|
||
|
$PRGNAM:
|
||
|
EOF
|
||
|
|
||
|
chown -R root:root *
|
||
|
|
||
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||
|
)
|