# SliTaz package receipt.

PACKED_SIZE="100.0K"
UNPACKED_SIZE="368.0K"
PACKAGE="libwnck"
VERSION="2.31.0"
CATEGORY="x-window"
SHORT_DESC="A Window Navigator Construction Kit."
MAINTAINER="pankso@slitaz.org"
LICENSE="LGPL2"
WEB_SITE="https://gitlab.gnome.org/GNOME/libwnck"

TARBALL="$PACKAGE-$VERSION.tar.xz"
WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION%.*}/$TARBALL"

DEPENDS="expat gtk+ startup-notification xorg-libICE xorg-libSM xorg-libX11 \
	xorg-libXau xorg-libXcomposite xorg-libXcursor xorg-libXdmcp xorg-libXext \
	xorg-libXfixes xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXdamage"
BUILD_DEPENDS="gettext gobject-introspection-dev gtk+-dev intltool \
	perl-xml-parser pkg-config xorg-dev"

current_version()
{
	wget -O - $GNOME_MIRROR/$PACKAGE/$(wget -O - $GNOME_MIRROR/$PACKAGE 2>/dev/null | \
	sed '/href="[0-9]/!d;/\./!d;s|.*href="||;s|/" .*||' | sort -Vr | sed q) 2>/dev/null | \
	sed "/href=\"$PACKAGE-[0-9]/!d;s|.*$PACKAGE-||;s|.[a-z].*||" | sort -Vr | sed q
}

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

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

	cp -a $install/usr/bin			$fs/usr
	cp -a $install/usr/lib/*.so*		$fs/usr/lib
	cp -a $install/usr/lib/girepository-1.0	$fs/usr/lib
}
