# SliTaz package receipt.

PACKAGE="mygestures"
VERSION="2.0"
CATEGORY="x-window"
SHORT_DESC="Recognizing gestures made with your mouse and perform actions."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://sourceforge.net/projects/mygestures/"

TARBALL="${PACKAGE}_$VERSION.tar.xz"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="jansson xorg-libX11 xorg-libXtst"
BUILD_DEPENDS="gcc83 jansson-dev xorg-libX11-dev xorg-libXtst"

HOST_ARCH="i486 arm"

# What is the latest version available today?
current_version()
{
	wget -O - https://sourceforge.net/projects/mygestures/files/mygestures/ 2>/dev/null | \
	sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
	sed '/scope="row/!d;s|.*/mygestures/||;s|/.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	export	CC=gcc-83
	export	CXX=g++-83

	./configure				\
		--sysconfdir=/etc/$PACKAGE	\
		$CONFIGURE_ARGS &&
	make &&
	make install
}

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

	cp -a $install/etc	$fs
	cp -a $install/usr/bin	$fs/usr
}