[Slackbuilds-users] Bugs in perl-template.SlackBuild

Chris Novakovic chris at chrisn.me.uk
Wed Dec 3 00:15:28 UTC 2014

Dear all,

There are a few bugs in perl-template.SlackBuild that prevent some
module distributions installing correctly, or at all.

"Build method #1" uses makefiles generated by ExtUtils::MakeMaker [1] to
drive the build process:

perl Makefile.PL \
  PREFIX=/usr \
  INSTALLDIRS=vendor \
make test
make install DESTDIR=$PKG

Module distributions that install system-wide scripts to /usr/bin have
the man pages for those scripts installed to /usr/share/man/man1 because
INSTALLVENDORMAN1DIR isn't set. The solution is to set
INSTALLVENDORMAN1DIR=/usr/man/man1 after setting INSTALLDIRS.

"Build method #2" uses Module::Build [2] to build and install the module

perl Build.PL \
  prefix=/usr \
  installdirs=vendor \
./Build test
./Build install \
  --install_path bindoc=/usr/man/man1 \
  --install_path libdoc=/usr/man/man3

There are two bugs here:

- Options and values passed to Build.PL aren't meant to be delimited
with = symbols, which leads to them being ignored; the default behaviour
is to install to /usr/local (and in the main perl directory, not in the
site or vendor subdirectories) and then to install directly to
/usr/local when running `./Build install`, thus bypassing $PKG entirely.
The solution is to replace the = symbols with spaces in the arguments to
`perl Build.PL`.

- The Module::Build cookbook [3] says that destdir should be passed to
`./Build install` rather than `perl Build.PL`. destdir=$PKG should
therefore move to `./Build install` and become --destdir $PKG.

With all three of these changes, I've yet to see a Perl module that
doesn't build and install correctly.


[2] http://search.cpan.org/~leont/Module-Build-0.4210/lib/Module/Build.pm

More information about the SlackBuilds-users mailing list