~bzr/ubuntu/lucid/debhelper/builddeps-ppa

« back to all changes in this revision

Viewing changes to Debian/Debhelper/Buildsystem/perl_build.pm

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-07-25 17:17:24 UTC
  • mfrom: (1.2.20 sid)
  • Revision ID: james.westby@ubuntu.com-20090725171724-zhhr5h0504vk9m21
Tags: 7.3.8ubuntu1
* Merge with Debian unstable (LP: #404561). Remaining Ubuntu changes:
  - dh_installudev: Default priority is now 40 by default, the target
    directory is /lib/udev/rules.d, and rules use '-' as separator instead of
    '_'.  Remove files from /etc/udev/rules.d unless they are user modified;
    if modified and of default priority, take care to rename.
    This should eventually go to Debian as well, see Debian #491117.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# A build system class for handling Perl Build based projects.
 
2
#
 
3
# Copyright: © 2008-2009 Joey Hess
 
4
#            © 2008-2009 Modestas Vainius
 
5
# License: GPL-2+
 
6
 
 
7
package Debian::Debhelper::Buildsystem::perl_build;
 
8
 
 
9
use strict;
 
10
use base 'Debian::Debhelper::Buildsystem';
 
11
 
 
12
sub DESCRIPTION {
 
13
        "Perl Module::Build (Build.PL)"
 
14
}
 
15
 
 
16
sub check_auto_buildable {
 
17
        my ($this, $step) = @_;
 
18
 
 
19
        # Handles everything
 
20
        my $ret = -e $this->get_sourcepath("Build.PL");
 
21
        if ($step ne "configure") {
 
22
                $ret &&= -e $this->get_sourcepath("Build");
 
23
        }
 
24
        return $ret;
 
25
}
 
26
 
 
27
sub do_perl {
 
28
        my $this=shift;
 
29
        $ENV{MODULEBUILDRC} = "/dev/null";
 
30
        $this->doit_in_sourcedir("perl", @_);
 
31
}
 
32
 
 
33
sub new {
 
34
        my $class=shift;
 
35
        my $this= $class->SUPER::new(@_);
 
36
        $this->enforce_in_source_building();
 
37
        return $this;
 
38
}
 
39
 
 
40
sub configure {
 
41
        my $this=shift;
 
42
        $ENV{PERL_MM_USE_DEFAULT}=1;
 
43
        $this->do_perl("Build.PL", "installdirs=vendor", @_);
 
44
}
 
45
 
 
46
sub build {
 
47
        my $this=shift;
 
48
        $this->do_perl("Build", @_);
 
49
}
 
50
 
 
51
sub test {
 
52
        my $this=shift;
 
53
        $this->do_perl("Build", "test", @_);
 
54
}
 
55
 
 
56
sub install {
 
57
        my $this=shift;
 
58
        my $destdir=shift;
 
59
        $this->do_perl("Build", "install", "destdir=$destdir", "create_packlist=0", @_);
 
60
}
 
61
 
 
62
sub clean {
 
63
        my $this=shift;
 
64
        $this->do_perl("Build", "--allow_mb_mismatch", 1, "distclean", @_);
 
65
}
 
66
 
 
67
1