#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=perl-File-MimeInfo
pkgver=0.15
pkgrel=3gv
source=(http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/File-MimeInfo/File-MimeInfo-$pkgver.tar.gz)
docs=("readme" "manifest" "changes")
url=http://search.cpan.org/~pardus/File-MimeInfo-0.15/lib/File/MimeInfo.pm

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"perl-File-MimeInfo (Determine file type with Perl)"
"This module can be used to determine the mime type of a file. It tries"
"to implement the freedesktop specification for a shared MIME database."
)


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