55 lines
1 KiB
Bash
Executable file
55 lines
1 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
VERSION=$(date +"%Y.%m.%d_%H.%M")
|
|
BUILD=1
|
|
|
|
ARCH=noarch
|
|
|
|
TAG=cyco
|
|
TMP=/tmp/$TAG
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
OUTPUT=/tmp
|
|
|
|
REPOSITORIES=/home/installs/SlackBuilds/repositories/
|
|
PREFIX=/usr
|
|
|
|
# cleaning
|
|
rm -fr $PKG
|
|
|
|
# get sources
|
|
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
|
|
mkdir -p $REPOSITORIES/$PRGNAM
|
|
( cd $REPOSITORIES/$PRGNAM
|
|
httrack http://jan.newmarch.name/go/index.html
|
|
)
|
|
else
|
|
( cd $REPOSITORIES/$PRGNAM
|
|
httrack --update
|
|
)
|
|
fi
|
|
|
|
mkdir -p $PKG$PREFIX/doc/
|
|
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
|
|
|
|
cd $PKG
|
|
mkdir -p install
|
|
cat <<EOF > install/slack-desc
|
|
$PRGNAM: $PRGNAM («Network programming with Go» book)
|
|
$PRGNAM:
|
|
$PRGNAM: An e-book on building network applications using the Google Go programming language.
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: Copyright Jan Newmarch, jan@newmarch.name
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: http://jan.newmarch.name/go/
|
|
$PRGNAM:
|
|
EOF
|
|
|
|
chown -R root:root *
|
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|