#!/bin/sh
CWD=`pwd`
TMP=/tmp
PKG=$TMP/package-start
VERSION=0.7
ARCH=alpha
BUILD=1
TARGET=$ARCH-alphaslack-linux

( cd $TMP
tar xjf $CWD/startup-notification-$VERSION.tar.bz2
cd startup-notification-$VERSION
chown -R root.root .
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib $TARGET
make
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/startup-notification-$VERSION
cp -a AUTHORS COPYING NEWS README doc/startup-notification.txt $PKG/usr/doc/startup-notification-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/startup-notification-$VERSION-$ARCH-$BUILD.tgz
) 2>&1 | tee $TMP/startup.build.log
