add Django Book
This commit is contained in:
parent
1f3adc7495
commit
e980b10da8
1 changed files with 59 additions and 0 deletions
59
doc/djangobook.com/djangobook.com.SlackBuild
Executable file
59
doc/djangobook.com/djangobook.com.SlackBuild
Executable file
|
@ -0,0 +1,59 @@
|
|||
#!/bin/sh
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
VERSION=git$(date +"%Y.%m.%d_%H.%M")
|
||||
BUILD=1
|
||||
|
||||
ARCH=$(uname -m)
|
||||
|
||||
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
||||
|
||||
TAG=cyco
|
||||
TMP=/tmp/$TAG
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
OUTPUT=/tmp
|
||||
|
||||
PREFIX=/usr
|
||||
|
||||
# cleaning
|
||||
rm -fr $PKG
|
||||
|
||||
# get sources
|
||||
if [ -e $REPOSITORY ] ; then
|
||||
( cd $REPOSITORY
|
||||
git pull
|
||||
)
|
||||
else
|
||||
git clone https://github.com/jacobian/djangobook.com.git $REPOSITORY
|
||||
fi
|
||||
|
||||
mkdir -p $TMP
|
||||
cp -R $REPOSITORY $TMP
|
||||
cd $TMP/$PRGNAM
|
||||
|
||||
make html epub
|
||||
|
||||
mkdir -p $PKG$PREFIX/doc/$PRGNAM
|
||||
cp -R _build/{html/*,epub/*.epub} $PKG$PREFIX/doc/$PRGNAM
|
||||
|
||||
cd $PKG
|
||||
mkdir -p install
|
||||
cat <<EOF > install/slack-desc
|
||||
$PRGNAM: $PRGNAM (Django book)
|
||||
$PRGNAM:
|
||||
$PRGNAM: a free book about the Django Web framework for the Python programming language.
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://www.djangobook.com/en/2.0/index.html
|
||||
$PRGNAM:
|
||||
EOF
|
||||
|
||||
chown -R root:root *
|
||||
|
||||
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
Loading…
Reference in a new issue