# SliTaz package receipt.

PACKED_SIZE="76.0K"
UNPACKED_SIZE="352.0K"
PACKAGE="tazpanel"
VERSION="1.5.3"
CATEGORY="system-tools"
SHORT_DESC="SliTaz administration and configuration panel."
MAINTAINER="pankso@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://www.slitaz.org/"
WGET_URL="http://hg.slitaz.org/tazpanel/archive/$VERSION.tar.gz"
CONFIG_FILES="/etc/slitaz/tazpanel.conf /etc/slitaz/httpd.conf"

DEPENDS="busybox"
BUILD_DEPENDS=""

# Rules to configure and make the package.
compile_rules()
{
	cd $src && make &&
	make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/etc/init.d
	cp -a $install/* $fs
	# Init script use tazpanel cmdline
	cd $fs/etc/init.d && ln -s ../../usr/bin/tazpanel .
}

# Pre and post install commands for Tazpkg.
post_install()
{
	grep -qs tazpanel $1/etc/hosts ||
		sed -i 's/^127.0.0.1.*/& tazpanel/' $1/etc/hosts
}
