# SliTaz package receipt.

PACKAGE="youtube-dl-gui"
COMMIT="a2a0d6fb4907d9282c2f45a00a1e51ce23602421"
VERSION="${COMMIT:0:10}"
CATEGORY="multimedia"
SHORT_DESC="A cross platform front-end GUI of the popular youtube-dl written in wxPython."
MAINTAINER="al.bobylev@gmail.com"
LICENSE="PublicDomain"
WEB_SITE="https://github.com/MrS0m30n3/youtube-dl-gui"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="$WEB_SITE/archive/$COMMIT.tar.gz"
GENERIC_PIXMAPS="no"

DEPENDS="youtube-dl wxpython"
BUILD_DEPENDS="wget cacerts wxpython-dev"

# What is the latest version available today?
current_version()
{
	wget -O - $WEB_SITE/releases 2>/dev/null | \
	sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
	python setup.py build
	python setup.py install --root=$install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share/icons/hicolor
	cp -a $install/usr/lib $fs/usr
	find $fs -name '*.pyc' -delete
	for size in 16x16 48x48; do
		mkdir -p $fs/usr/share/icons/hicolor/$size/apps
		cp -a $install/usr/share/icons/hicolor/$size/apps/*.png \
		$fs/usr/share/icons/hicolor/$size/apps/$PACKAGE.png
	done
}