Receipt for: cssed

source stuff/cssed.desktop
# SliTaz package receipt.

PACKAGE="cssed"
VERSION="0.4.0"
CATEGORY="development"
SHORT_DESC="CSS editor for web developers"
MAINTAINER="claudinei@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://cssed.sourceforge.net"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="gtk+"
BUILD_DEPENDS="gtk+-dev libxml2-dev libpng+apng-dev"

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

# Rules to configure and make the package.
compile_rules()
{
	sed -i "s/char\* o = 0;/const char\* o = 0;/" $src/scintilla/src/LexCaml.cxx
	./configure $CONFIGURE_ARGS &&
	sed -i 's/^cssed_LDADD.*/\0 -lgmodule-2.0/' $src/src/Makefile &&
	make &&
	make install
}

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