diff --git a/doc/sicp-python3/sicp-python3.SlackBuild b/doc/sicp-python3/sicp-python3.SlackBuild new file mode 100755 index 00000000..26713eff --- /dev/null +++ b/doc/sicp-python3/sicp-python3.SlackBuild @@ -0,0 +1,56 @@ +#!/bin/sh + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +VERSION=$(date +"%Y.%m.%d_%H.%M") +BUILD=1 + +ARCH=$(uname -m) + +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://www-inst.eecs.berkeley.edu/~cs61a/sp12/ + ) +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 < install/slack-desc +$PRGNAM: $PRGNAM (Teaching SICP using Python3 course) +$PRGNAM: +$PRGNAM: Berkeley class +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: http://www-inst.eecs.berkeley.edu/~cs61a/sp12/ +$PRGNAM: +EOF + +chown -R root:root * + +makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz