Receipt for: superswitcher

source stuff/superswitcher-0.6-wnck-workspace.patch
# SliTaz package receipt.

PACKAGE="superswitcher"
VERSION="0.6"
CATEGORY="x-window"
SHORT_DESC="Replacement for the Alt-Tab window switching behavior"
MAINTAINER="mallory@sweetpeople.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://github.com/nigeltao/superswitcher"
WGET_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/$PACKAGE/$TARBALL"

DEPENDS="gtk+ libwnck GConf"
BUILD_DEPENDS="perl-xml-parser intltool glib-dev gtk+-dev libwnck-dev \
autoconf automake"

# What is the latest version available today?
current_version()
{
	wget -O - https://raw.githubusercontent.com/nigeltao/superswitcher/master/ChangeLog 2>/dev/null | \
	sed '1!d;s| .*||;s|-||g'
}

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	find . -name '*.[ch]*' | xargs sed -i 's|<glib/.*h|<glib.h|'

	# Fix from Gentoo: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-misc/superswitcher/superswitcher-0.6.ebuild
	patch -p1 < $stuff/superswitcher-0.6-wnck-workspace.patch
	sed -i '/-DG.*_DISABLE_DEPRECATED/d;s/@WARN_CFLAGS@//' src/Makefile.am 
	aclocal
	autoconf
	automake --add-missing
	sed -i '/GNOME_COMPILE_WARNINGS/d' configure
	./configure \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		$CONFIGURE_ARGS &&
	make && make DESTDIR=$DESTDIR install
}

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