From 20ef78b7f1e7cf722e52814d03a7c7e1bad3e5e9 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 9 Aug 2011 18:09:33 +0200 Subject: [PATCH] add underscore.php --- web/underscore.php/underscore.php.Slackbuild | 55 ++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 web/underscore.php/underscore.php.Slackbuild diff --git a/web/underscore.php/underscore.php.Slackbuild b/web/underscore.php/underscore.php.Slackbuild new file mode 100755 index 00000000..fe05e306 --- /dev/null +++ b/web/underscore.php/underscore.php.Slackbuild @@ -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 < 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