1 # A build system class for handling Perl Build based projects.
3 # Copyright: © 2008-2009 Joey Hess
4 # © 2008-2009 Modestas Vainius
7 package Debian::Debhelper::Buildsystem::perl_build;
10 use base 'Debian::Debhelper::Buildsystem';
13 "Perl Module::Build (Build.PL)"
16 sub check_auto_buildable {
17 my ($this, $step) = @_;
20 my $ret = -e $this->get_sourcepath("Build.PL");
21 if ($step ne "configure") {
22 $ret &&= -e $this->get_sourcepath("Build");
29 $this->doit_in_sourcedir("perl", @_);
34 my $this= $class->SUPER::new(@_);
35 $this->enforce_in_source_building();
41 $ENV{PERL_MM_USE_DEFAULT}=1;
42 $this->do_perl("Build.PL", "installdirs=vendor", @_);
47 $this->do_perl("Build", @_);
52 $this->do_perl("Build", "test", @_);
58 $this->do_perl("Build", "install", "destdir=$destdir", "create_packlist=0", @_);
63 if (-e $this->get_sourcepath("Build")) {
64 $this->do_perl("Build", "--allow_mb_mismatch", 1, "distclean", @_);