# SliTaz package receipt v2.

PACKAGE="filature"
VERSION="0.4"
CATEGORY="development"
SHORT_DESC="Filature client: fil commands over SSH, messages in your editor"
MAINTAINER="pankso@slitaz.org"
LICENSE="BSD"
WEB_SITE="https://filature.slitaz.org/"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://hg.slitaz.org/$PACKAGE/archive/$VERSION.tar.gz"
TAGS="development bugs forum"
HOST_ARCH="i486 x86_64"

BUILD_DEPENDS="gtk+3-dev pkg-config"
SPLIT="$PACKAGE-report $PACKAGE-report-gtk"
# The desktop entry belongs to filature-report-gtk only
COOKOPTS="!menus"

# Rules to configure and make the package. Only the client side: the
# server (the setgid fil binary) is built from the sources on the server
# (deploy/foyer.sh) or for a local test (tests/local.sh), never packaged.
# The dev wrapper waits under client/ until genpkg_rules.
compile_rules()
{
	make -C client WERROR= &&
	make -C client DESTDIR=$DESTDIR install-report &&
	make -C client DESTDIR=$DESTDIR/client install-client
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	case "$PACKAGE" in
	filature)
		mkdir -p $fs/usr/bin
		cp -a $install/client/usr/bin/fil	$fs/usr/bin
		cp -a $install/client/usr/share	$fs/usr
		DEPENDS="" ;;
	filature-report)
		SHORT_DESC="Report a bug to the SliTaz developers (console)"
		CATEGORY="system-tools"
		mkdir -p $fs/usr/bin
		cp -a $install/usr/bin/filature-report	$fs/usr/bin
		DEPENDS="" ;;
	filature-report-gtk)
		SHORT_DESC="Report a bug to the SliTaz developers (GTK3 dialog)"
		CATEGORY="system-tools"
		mkdir -p $fs/usr/bin $fs/usr/share
		cp -a $install/usr/bin/filature-report-gtk	$fs/usr/bin
		cp -a $install/usr/share/applications	$fs/usr/share
		cp -a $install/usr/share/icons		$fs/usr/share
		DEPENDS="filature-report gtk+3" ;;
	esac
}
