2010-09-01 04:36:21 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
|
|
VERSION=$(date +"%Y.%m.%d_%H.%M")
|
|
|
|
BUILD=1
|
2011-02-17 05:54:04 +01:00
|
|
|
|
2010-09-01 04:36:21 +02:00
|
|
|
ARCH=noarch
|
|
|
|
|
2016-09-18 22:48:56 +02:00
|
|
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
2010-09-01 04:36:21 +02:00
|
|
|
|
2011-02-17 05:54:04 +01:00
|
|
|
TAG=cyco
|
|
|
|
TMP=/tmp/$TAG
|
2010-09-01 04:36:21 +02:00
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
OUTPUT=/tmp
|
|
|
|
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
# cleaning
|
|
|
|
rm -fr $PKG
|
|
|
|
|
|
|
|
# get sources
|
2016-09-18 22:48:56 +02:00
|
|
|
[ ! -e $REPOSITORY ] && git clone http://github.com/visionmedia/masteringnode.git $REPOSITORY
|
|
|
|
( cd $REPOSITORY && git pull )
|
|
|
|
VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )"
|
2010-09-01 04:36:21 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG$PREFIX/doc/
|
2016-09-18 22:48:56 +02:00
|
|
|
cp -R $REPOSITORY $PKG$PREFIX/doc/$PRGNAM
|
2010-09-01 04:36:21 +02:00
|
|
|
find $PKG$PREFIX/doc/$PRGNAM -name \.git\* -exec rm -fr {} \;
|
|
|
|
|
|
|
|
( cd $PKG
|
2016-09-18 22:48:56 +02:00
|
|
|
mkdir -p install
|
|
|
|
cat <<EOF > install/slack-desc
|
2010-09-01 04:36:21 +02:00
|
|
|
$PRGNAM: $PRGNAM (a book about Node.js)
|
2016-09-18 22:48:56 +02:00
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
2010-09-01 04:36:21 +02:00
|
|
|
$PRGNAM: http://visionmedia.github.com/masteringnode/
|
2016-09-18 22:48:56 +02:00
|
|
|
$PRGNAM:
|
2010-09-01 04:36:21 +02:00
|
|
|
EOF
|
|
|
|
|
2016-09-18 22:48:56 +02:00
|
|
|
chown -R root:root *
|
2010-09-01 04:36:21 +02:00
|
|
|
|
2016-09-18 22:48:56 +02:00
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
2010-09-01 04:36:21 +02:00
|
|
|
)
|