# Class to build perl modules. # Default pkg attributes. url="http://search.cpan.org/dist/${_realname}/" license=('GPL' 'PerlArtistic') depends=('perl') options=(!emptydirs) pre_build() { if [ -z $_realname ]; then error "Variable _realname not set" return 1 fi } perl_build() { cd ${startdir}/src/${_realname}-${pkgver} eval `perl -V:archname` perl Makefile.PL \ INSTALLARCHLIB=/usr/lib/perl5/current/${archname} \ INSTALLSITELIB=/usr/lib/perl5/site_perl/current \ INSTALLSITEARCH=/usr/lib/perl5/site_perl/current/${archname} make || return 1 make install DESTDIR=${startdir}/pkg } post_build() { # remove perllocal.pod and .packlist. find ${startdir}/pkg -name perllocal.pod -delete find ${startdir}/pkg -name .packlist -delete } class_build_funcs=(pre_build perl_build post_build optional)