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

pkgname=perl-term-readkey
pkgver=2.30.01
pkgrel=2fg
#arch=noarch
source=(http://search.cpan.org/CPAN/authors/id/S/ST/STSI/TermReadKey-$pkgver.tar.gz)
sourcetemplate=http://people.salixos.org/fredg/packages/$pkgname/$pkgver/
docs=("readme" "manifest")
url=http://search.cpan.org/~stsi/TermReadKey/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"perl-term-readkey (perl TermReadKey module)"
"A perl module for simple terminal control"
)


build() {
	cd $startdir/src/TermReadKey-$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
}