# SliTaz package receipt.

PACKAGE="lxtaz-logout"
VERSION="11"
CATEGORY="x-window"
SHORT_DESC="Central logout/reboot/shutdown dialog 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"
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/logout
	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
}
