# SliTaz package receipt.

PACKAGE="py3k"
VERSION="3.2.2"
CATEGORY="development"
SHORT_DESC="The Python 3000 programming language."
MAINTAINER="pascal.bellard@slitaz.org"
SOURCE="Python"
DEPENDS="openssl bzlib readline sqlite zlib xorg-libXss ncursesw gdbm \
tk xorg-libXext"
TARBALL="$SOURCE-$VERSION.tar.bz2"
WEB_SITE="http://www.python.org/download/releases/3.2/"
WGET_URL="http://www.python.org/ftp/python/$VERSION/$TARBALL"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	./configure --enable-shared --with-ncurses \
	--prefix=/usr --infodir=/usr/share/info \
	--mandir=/usr/share/man $CONFIGURE_ARGS &&
	make &&
	make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	python_version=${VERSION:0:3}
	mkdir -p $fs/usr/include/python${python_version}m
	cp -a $_pkg/usr/bin $fs/usr
	cp -a $_pkg/usr/lib $fs/usr
	# needed for python3 to work
	cp -a $_pkg/usr/include/python${python_version}m/pyconfig.h \
		$fs/usr/include/python${python_version}m
	rm -f $fs/usr/bin/*-config
}