# SliTaz package receipt.

PACKAGE="gitso"
VERSION="0.6"
CATEGORY="network"
SHORT_DESC="Frontend to reverse VNC connections."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL3"
TARBALL="${PACKAGE}_${VERSION}_src.tar.bz2"
WEB_SITE="https://github.com/AustP/Gitso"
WGET_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/gitso/$TARBALL"
CONFIG_FILES="/etc/gitso-hosts"

DEPENDS="x11vnc vncviewer wxpython"

# What is the latest version available today?
current_version()
{
	wget -O - $WEB_SITE/commits/master 2>/dev/null | \
	sed '/Commits on/!d;s|.*on |"|;s|<.*|"|;q' | xargs date +%Y%m%d -d
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share/applications $fs/usr/share/gitso $fs/usr/bin $fs/etc
	cp $src/*.py $fs/usr/share/gitso
	cp $src/icon.* $fs/usr/share/gitso
	cp $src/arch/linux/gitso.desktop $fs/usr/share/applications
	cp $src/arch/linux/gitso $fs/usr/bin
	touch $fs/etc/gitso-hosts
	chmod 755 $fs/usr/bin/gitso
	chmod a+r $fs/usr/share/*/* 
}