#Packager: Frédéric Galusik <fredg~at~salixos~dot~org>

pkgname=perl-curses
pkgver=1.28
pkgrel=3fg
#arch=noarch
source=(http://www.cpan.org/authors/id/G/GI/GIRAFFED/Curses-$pkgver.tgz)
sourcetemplate=http://people.salixos.org/fredg/packages/$pkgname/$pkgver/
docs=("readme" "install" "copying" "Artistic")
url=http://search.cpan.org/dist/Curses

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"perl-curses (terminal screen handling and optimization)"
"This is a dynamic loadable curses module for perl"
)


build() {
	cd $startdir/src/Curses-$pkgver

	perl Makefile.PL || exit 1
	make OPTIMIZE="$CFLAGS" || exit 1
	make install INSTALLDIRS=vendor DESTDIR=$startdir/pkg || exit 1

	# Remove perllocal.pod and .packlist if present in the package
	( for i in perllocal.pod .packlist; do
	        find $startdir/pkg -name "$i" -exec rm -rf {} \;
		  done
	) || exit 1
}