#!/bin/sh # Heavily based on the Slackware 13.0 SlackBuild # https://coherence.beebits.net/wiki # Packager Michelino Chionchio - www.slacky.eu # # Required louie, twisted, zope.interface CWD=`pwd` TMP=${TMP:-/tmp/txz} NAME=coherence PKG=$TMP/package/$NAME VERSION=0.6.6 ARCH=${ARCH:-x86} BUILD=1mch SOURCE=http://coherence-project.org/download/Coherence-$VERSION.tar.gz if [ ! -e Coherence-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/Coherence-$VERSION.tar.gz cd Coherence-$VERSION find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; chown -R root:root . python setup.py build || exit 1 python setup.py install --root=$PKG || exit 1 mkdir -p $PKG/usr/doc/$NAME-$VERSION/SlackBuild cp -a ChangeLog LICENCE MANIFEST.in NEWS PKG-INFO README docs/* $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/$NAME.SlackBuild cd $PKG ADD=$(ls /var/log/packages/ | sed -ne 's/\(louie\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(twisted\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(zope.interface\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2/p') \ requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi