# SliTaz package receipt.

PACKAGE="h8300-gdb"
SOURCE="gdb"
VERSION="7.1"
CATEGORY="development"
SHORT_DESC="The GNU Project Debugger targeting the H8/300."
MAINTAINER="rcx@zoominternet.net"
DEPENDS="ncurses expat"
BUILD_DEPENDS="slitaz-toolchain ncurses-dev expat-dev"
TARBALL="$SOURCE-$VERSION.tar.gz"
WEB_SITE="http://www.gnu.org/software/gdb/"
WGET_URL="$GNU_MIRROR/$SOURCE/$TARBALL"

# Configuration only needs included if we're in the build/wok environment
if [ -e $WOK/h8300-toolchain/stuff/h8300.conf ] ; then
	. $WOK/h8300-toolchain/stuff/h8300.conf
fi

# Rules to configure and make the package.
compile_rules()
{
	mkdir -p $SOURCE-$VERSION-build
	cd $SOURCE-$VERSION-build
	$src/configure \
		--disable-werror \
		--target=$H8300_TARGET \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		$CONFIGURE_ARGS &&
	make $MAKEFLAGS &&
	make DESTDIR=$src/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr
	cp -a $_pkg/usr/bin $fs/usr
}

# Rules to clean the package
clean_wok()
{
	rm -r -f $SOURCE-$VERSION-build
}