summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem/perl_makefile.pm
blob: 67a6f441ab442d52d82a14fcc64349bdda564013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# A buildsystem plugin for handling Perl Build based projects.
#
# Copyright: © 2008-2009 Joey Hess
#            © 2008-2009 Modestas Vainius
# License: GPL-2+

package Debian::Debhelper::Buildsystem::perl_makefile;

use strict;
use Debian::Debhelper::Dh_Lib;
use Debian::Debhelper::Dh_Buildsystem_Bases;
use base 'Debian::Debhelper::Dh_Buildsystem_Basic';

sub DESCRIPTION {
	"support for building Perl Makefile.PL based packages (in-source only)"
}

sub is_buildable {
	my ($self, $action) = @_;
	return ($action eq "configure")  && (-e "Makefile.PL");
}

sub new {
	my $cls=shift;
	my $self=$cls->SUPER::new(@_);
	$self->enforce_in_source_building();
	return $self;
}

sub configure_impl {
	my $self=shift;
	# If set to a true value then MakeMaker's prompt function will
	# # always return the default without waiting for user input.
	$ENV{PERL_MM_USE_DEFAULT}=1;
	doit("perl", "Makefile.PL", "INSTALLDIRS=vendor", @_);
}

1;