# SliTaz package receipt.

PACKAGE="snownews"
VERSION="1.5.13"
CATEGORY="network"
SHORT_DESC="Text mode RSS newsreader."
MAINTAINER="paul@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://sourceforge.net/projects/snownews/"
WGET_URL="$SF_MIRROR/project/$PACKAGE/$TARBALL"

DEPENDS="libxml2 ncurses zlib libcrypto"
BUILD_DEPENDS="zlib-dev libxml2-dev ncurses-dev gettext perl \
openssl-dev acl libcroco wget"

# What is the latest version available today?
current_version()
{
	wget -O - https://sourceforge.net/projects/$PACKAGE/files/ 2>/dev/null | \
	sed '/snownews-/!d;s/.*snownews-//;s/.tar.*//;q'
}

# Rules to configure and make the package.
compile_rules()
{
	sed -i 's|lncurses|& -ltinfo|' *
	./configure --prefix=/usr &&
	make && make DESTDIR=$DESTDIR install
}

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