# SliTaz package receipt.

PACKED_SIZE="24.0K"
UNPACKED_SIZE="80.0K"
PACKAGE="lxsession-edit"
VERSION="0.2.0"
CATEGORY="x-window"
SHORT_DESC="Configure what application start up automatically in LXDE"
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://github.com/lxde/lxsession"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="$SF_MIRROR/lxde/$TARBALL"
TAGS="LXDE"
HOST_ARCH="i486 arm"
GENERIC_MENUS="no"

DEPENDS="gtk+ lxsession"
BUILD_DEPENDS="gtk+-dev"

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

# Rules to configure and make the package.
compile_rules()
{
	./configure \
		--sysconfdir=/etc \
		$CONFIGURE_ARGS &&
	make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	cp -a $install/* $fs
	rm -r $fs/usr/share/locale

	sed -i 's|^Icon=.*$|Icon=session-properties|' \
		$fs/usr/share/applications/lxsession-edit.desktop
}
