slackbuilds/web/right.js/right.js.SlackBuild
Gwenhael Le Moine d7f4525c1b add web/right.js
Signed-off-by: Gwenhael Le Moine <cycojesus@darkstar.example.net>
2009-12-22 17:27:34 +07:00

69 lines
1.6 KiB
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=git$(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
function pull_or_clone() {
NAM=$1
if [ -e $REPOSITORIES/$NAM ] ; then
( cd $REPOSITORIES/$NAM
git pull
)
else
git clone git://github.com/rightjs/$NAM.git $REPOSITORIES/$NAM
fi
}
# cleaning
rm -fr $PKG
# get sources
[ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES
( cd $REPOSITORIES
pull_or_clone rightjs-core
pull_or_clone rightjs-ui
pull_or_clone rightjs-goods
pull_or_clone rightjs-home
)
mkdir -p $PKG/srv/www/htdocs/$PRGNAM
cp -R $REPOSITORIES/rightjs-core $PKG/srv/www/htdocs/$PRGNAM
cp -R $REPOSITORIES/rightjs-ui $PKG/srv/www/htdocs/$PRGNAM
cp -R $REPOSITORIES/rightjs-goods $PKG/srv/www/htdocs/$PRGNAM
cp -R $REPOSITORIES/rightjs-home $PKG/srv/www/htdocs/$PRGNAM
find $PKG/srv/www/htdocs -name \.git\* -exec rm -fr {} \;
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (The Right JavaScript Framework)
$PRGNAM:
$PRGNAM: RightJS is a new JavaScript framework. It takes many old, battle proven
$PRGNAM: features, wraps them nicely, mixes with some new ideas and features,
$PRGNAM: and as the result provides a tiny, fast and easy to use tool.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://rightjs.org/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz
)