# SliTaz package receipt.

PACKED_SIZE="76.0K"
UNPACKED_SIZE="264.0K"
PACKAGE="beaver"
VERSION="0.4.1"
CATEGORY="text"
SHORT_DESC="Simple and very light advanced text editor"
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://beaver-editor.sourceforge.net/"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="$SF_MIRROR/$PACKAGE-editor/$TARBALL"
TAGS="text-editor"
HOST_ARCH="i486 arm"
GENERIC_PIXMAPS="no"

DEPENDS="gtk+ xorg-libXdamage"
BUILD_DEPENDS="gtk+-dev xorg-xproto expat-dev"
SPLIT="beaver-plugins"

# What is the latest version available today?
current_version()
{
	wget -O - $WEB_SITE 2>/dev/null | \
	sed '/Stable/!d;s|.*Beaver ||;s| Stable.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	sed -i 's|dir/po/\*\.po|& 2>/dev/null|' configure
	patch -p1 -i $stuff/icon.patch

	./configure $CONFIGURE_ARGS && make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share/icons/hicolor/32x32/
	cp -a $install/usr/share/icons/hicolor/32x32/apps \
		$fs/usr/share/icons/hicolor/32x32/
	cook_copy_files beaver
	cook_copy_icons
	mkdir -p $fs/usr/share/beaver
	cp -a $install/usr/share/beaver/resource $fs/usr/share/beaver

	# Custom default configuration
	cp -a $stuff/beaver.conf.default $fs/usr/share/beaver/resource
}
