add underscore.php

This commit is contained in:
Gwenhael Le Moine 2011-08-09 18:09:33 +02:00
parent b1345b3345
commit 20ef78b7f1

View file

@ -0,0 +1,55 @@
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +%Y.%m.%d_%H.%M)
BUILD=1
ARCH=$(uname -m)
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
if [ -e $REPOSITORIES/$PRGNAM ] ; then
( cd $REPOSITORIES/$PRGNAM
git pull
)
else
git clone "https://github.com/brianhaveri/Underscore.php.git" $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 (Functional programming library for PHP5.3+)
$PRGNAM:
$PRGNAM: Underscore.php is a PHP port of Underscore.js.
$PRGNAM: In addition to porting Underscore's functionality, Underscore.php includes
$PRGNAM: matching unit tests.
$PRGNAM: For docs, license, tests, and downloads, see:
$PRGNAM: http://brianhaveri.github.com/Underscore.php
$PRGNAM:
$PRGNAM: Thanks to Jeremy Ashkenas and all contributors to Underscore.js.
$PRGNAM:
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz