# SliTaz package receipt.

PACKAGE="perl-date-calc"
VERSION="6.4"
CATEGORY="development"
SHORT_DESC="Perl extension Date::Calc for Gregorian calendar date calculations."
MAINTAINER="slaxemulator@gmail.com"
LICENSE="GPL"
WEB_SITE="https://metacpan.org/release/Date-Calc/"

SOURCE="Date-Calc"
TARBALL="$SOURCE-$VERSION.tar.gz"
WGET_URL="https://www.cpan.org/modules/by-module/Date/$TARBALL"

DEPENDS="perl perl-bit-vector"
BUILD_DEPENDS="$DEPENDS"

current_version()
{
	wget -O - $WEB_SITE 2>/dev/null | \
	sed '/release-name/!d;s|.*-v*||;s|<.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	perl Makefile.PL &&
	make &&
	make install DESTDIR=$DESTDIR
}

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