slackbuilds/UNUSED/doc/django-best-practices/SlackBuild

69 lines
1.3 KiB
Text
Raw Normal View History

2013-03-13 09:58:13 +01:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
ARCH=noarch
REPOSITORIES=/home/installs/SlackBuilds/repositories
2020-06-25 11:23:11 +02:00
TAG=gwh
2013-03-13 09:58:13 +01:00
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
if [ -e $REPOSITORIES/$PRGNAM ] ; then
( cd $REPOSITORIES/$PRGNAM
git pull
)
else
git clone http://github.com/lincolnloop/django-best-practices.git $REPOSITORIES/$PRGNAM
fi
mkdir -p $TMP
cp -R $REPOSITORIES/$PRGNAM $TMP
cd $TMP/$PRGNAM
2013-04-12 11:39:18 +02:00
make html epub
2013-03-13 09:58:13 +01:00
mkdir -p $PKG$PREFIX/doc/
2013-04-12 11:39:18 +02:00
cp -R .build/html $PKG$PREFIX/doc/$PRGNAM
cp .build/epub/*.epub $PKG$PREFIX/doc/$PRGNAM
2013-03-13 09:58:13 +01:00
ebook-convert $PKG$PREFIX/doc/$PRGNAM/index.html \
$PKG$PREFIX/doc/$PRGNAM/$PRGNAM.epub \
--authors="Lincoln Loop" \
--author-sort="Lincoln Loop" \
--title="Django Best Practices" \
--title-sort="Django Best Practices" \
--language=English \
--rating=5
2013-03-13 09:58:13 +01:00
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (Django Best Practices)
$PRGNAM:
$PRGNAM: A guide to developing and deploying with the Django Web framework
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://lincolnloop.com/django-best-practices/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)