add
This commit is contained in:
parent
b285683c93
commit
85385b17f8
1 changed files with 46 additions and 0 deletions
46
doc/the_C_book/the_C_book.SlackBuild
Executable file
46
doc/the_C_book/the_C_book.SlackBuild
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/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
|
Loading…
Add table
Reference in a new issue