#!/bin/sh # # KwortBuild for OpenProximity # http://wiki.muiline.com/obex-data-server # By Manuel Naranjo # # based on SlackwareBuild for bluez-utils by # By SukkoPera NAME=OpenProximity # Get the current and temporary directories CWD=$(pwd) if [ "$TMP" = "" ]; then TMP=/tmp fi if [ ! -d $TMP ] then mkdir -p $TMP fi PKG=$TMP/package-$NAME # Some useful variables about the package VERSION=${VERSION:-0.2} ARCH=${ARCH:-noarch} BUILD=${BUILD:-1} PACKER=${PACKER:-aircable} rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf $NAME-$VERSION gunzip -c -d $CWD/${NAME}-${VERSION}.tar.gz | tar xv || exit 1 cd $NAME-$VERSION chown -R root:root . 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 {} \; mkdir -p $PKG/usr python setup.py install --prefix=$PKG/usr chmod +x $PKG/usr/bin/openproximity.py cd $PKG/usr/bin mv openproximity.py openproximity cd $PKG mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD$PACKER