# SliTaz package receipt.

PACKAGE="lxtaz-dock"
VERSION="8"
CATEGORY="x-window"
SHORT_DESC="Bottom dock with favorite launchers for the SliTaz desktop."
MAINTAINER="pankso@slitaz.org"
LICENSE="BSD"
WEB_SITE="https://www.slitaz.org/"
SOURCE="lxtaz"
TARBALL="$SOURCE-$VERSION.tar.gz"
WGET_URL="https://hg.slitaz.org/$SOURCE/archive/$VERSION.tar.gz"
HOST_ARCH="i486 x86_64"

DEPENDS="gtk+3 xorg-libX11"
BUILD_DEPENDS="gtk+3-dev pkg-config gettext-tools"

# What is the latest version available today?
current_version()
{
	wget -O - https://hg.slitaz.org/$SOURCE/ 2>/dev/null | \
	sed '/^Changeset/!d;s|.*">|https://hg.slitaz.org/'$SOURCE'/rev/|;s|<.*||' | \
	xargs wget -O - 2>/dev/null | sed '/rev /!d;s|.*rev ||;s| .*||'
}

# Rules to configure and make the package.
compile_rules()
{
	cd $src/dock
	make -C src
	make -C po
	make -C src install DESTDIR=$DESTDIR PREFIX=/usr
	make -C po install DESTDIR=$DESTDIR PREFIX=/usr
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	cp -a $install/* $fs
}

post_install()
{
	chroot "$1/" gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor 2>/dev/null
	true
}
