diff --git a/d/jsl/jsl.SlackBuild b/d/jsl/jsl.SlackBuild new file mode 100755 index 00000000..3e12d496 --- /dev/null +++ b/d/jsl/jsl.SlackBuild @@ -0,0 +1,70 @@ +#!/bin/sh + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +BRANCH=trunk +VERSION=$BRANCH$(date +%F | tr -d -) +BUILD=1 +PACKAGER=cyco +ARCH=$(uname -m) + +REPOSITORIES=/home/cycojesus/projets/packages/repositories + +TMP=/tmp/$PACKAGER +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 + svn update + ) + else + svn co https://javascriptlint.svn.sourceforge.net/svnroot/javascriptlint/$BRANCH $PRGNAM + fi +) + +mkdir -p $TMP +( cd $TMP + rm -fr $PRGNAM-$VERSION && cp -R $REPOSITORIES/$PRGNAM $PRGNAM-$VERSION + ( cd $PRGNAM-$VERSION + python setup.py build + python setup.py install --root=$PKG + ) +) + +( cd $PKG + mkdir -p install + cat < install/slack-desc +$PRGNAM: $PRGNAM (Javascript Lint) +$PRGNAM: +$PRGNAM: With JavaScript Lint, you can check all your JavaScript source code for common +$PRGNAM: mistakes without actually running the script or opening the web page. +$PRGNAM: +$PRGNAM: JavaScript Lint holds an advantage over competing lints because it is based on +$PRGNAM: the JavaScript engine for the Firefox browser. This provides a robust framework +$PRGNAM: that can not only check JavaScript syntax but also examine the coding techniques +$PRGNAM: used in the script and warn against questionable practices. +$PRGNAM: +$PRGNAM: http://www.javascriptlint.com +EOF + + chown -R root:root * + + [ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; + + ( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + ) + + makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz +)