mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
d7f4525c1b
Signed-off-by: Gwenhael Le Moine <cycojesus@darkstar.example.net>
69 lines
1.6 KiB
Bash
Executable file
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
|
|
)
|