#!/bin/sh
#
# Copyright 2004 Dagmar d'Surreal <rivyqntzne@tznvy.pbz>
# Available under the terms of the GNU GPL.
#

NAME="pyrex"
VERSION="0.9.3"
REVISION="4"
PKG_ARCH="noarch"

PKG_SOURCEURL='http://nz.cosc.canterbury.ac.nz/%7Egreg/python/Pyrex/Pyrex-$VERSION.tar.gz'
PKG_SOURCEMD5="63c4cb884d6b777d3806f9669ba5feba"

. $DLG_ROOT/config
. $DLG_ROOT/SCRIPTS/dropline-functions.sh

prepare
spewdo "cd $PKG_SRCROOT"
loggedcommand build_bdist "python setup.py bdist -p linux-$PKG_ARCH"
status=$?
if [ $status != 0 ]; then
  die "Error!  build_bdist exited with status: $status"
fi

if [ ! -r $PKG_SRCROOT/dist/Pyrex-$VERSION.linux-$PKG_ARCH.tar.gz ]; then
  die "Error!  Something unexpected has changed in the python nbdist target!"
fi
spewdo "cd $PKG_STAGEROOT"

loggedcommand untar_bdist "tar -zxf $PKG_SRCROOT/dist/Pyrex-$VERSION.linux-$PKG_ARCH.tar.gz"
status=$?
if [ $status != 0 ]; then
  die "Error!  untar_bdist exited with status: $status"
fi
 
tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup
