mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
46 lines
852 B
Bash
Executable file
46 lines
852 B
Bash
Executable file
#!/bin/sh
|
|
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")}
|
|
BUILD=${BUILD:-1}
|
|
|
|
ARCH=${ARCH:-$(uname -m)}
|
|
|
|
TAG=cyco
|
|
TMP=${TMP:-/tmp/$TAG}
|
|
PKG=${PKG:-$TMP/pkg-$PRGNAM}
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
PREFIX=${PREFIX:-/usr}
|
|
|
|
# cleaning
|
|
rm -fr $PKG
|
|
|
|
# get sources
|
|
wget -c http://publications.gbdirect.co.uk/c_book/the_c_book.pdf -O $CWD/the_c_book.pdf
|
|
wget -c http://publications.gbdirect.co.uk/c_book/thecbook.pdf -O $CWD/thecbook.pdf
|
|
|
|
mkdir -p $PKG$PREFIX/doc/$PRGNAM
|
|
cp -R $CWD/*.pdf $PKG$PREFIX/doc/$PRGNAM
|
|
|
|
cd $PKG
|
|
mkdir -p install
|
|
cat <<EOF > install/slack-desc
|
|
$PRGNAM: $PRGNAM (The C book)
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: http://publications.gbdirect.co.uk/c_book/
|
|
$PRGNAM:
|
|
EOF
|
|
|
|
chown -R root:root *
|
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|