# SliTaz package receipt.

PACKED_SIZE="32.0K"
UNPACKED_SIZE="84.0K"
PACKAGE="libffi"
VERSION="3.4.2"
CATEGORY="development"
SHORT_DESC="A portable foreign function interface library."
MAINTAINER="rcx@zoominternet.net"
LICENSE="MIT"
WEB_SITE="https://sourceware.org/libffi/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://github.com/$PACKAGE/$PACKAGE/releases/download/v$VERSION/$TARBALL"

DEPENDS="glibc-base"

HOST_ARCH="i486 arm"

current_version()
{
	wget -O - $WEB_SITE 2>/dev/null | \
	sed "/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|;q"
}

# Rules to configure and make the package.
compile_rules()
{
	./configure				\
		--includedir=/usr/include	\
		$CONFIGURE_ARGS  &&
	make &&
	make install DESTDIR=$DESTDIR
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	cook_copy_files	*.so*
}
