# SliTaz package receipt.

PACKED_SIZE="36.0K"
UNPACKED_SIZE="92.0K"
PACKAGE="libcddb"
VERSION="1.3.2"
CATEGORY="multimedia"
SHORT_DESC="C library to access data on a CDDB server (freedb.org)."
MAINTAINER="pankso@slitaz.org"
LICENSE="LGPL2"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="https://libcddb.sourceforge.net/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

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

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	./configure \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		$CONFIGURE_ARGS &&
	make &&
	make DESTDIR=$DESTDIR install
}

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