File: lua.pm

package info (click to toggle)
dh-lua 24
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 236 kB
  • ctags: 21
  • sloc: sh: 124; ansic: 110; perl: 96; makefile: 59
file content (52 lines) | stat: -rw-r--r-- 1,295 bytes parent folder | download | duplicates (5)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright: © 2012 Enrico Tassi <gareuselesinge@debian.org>
# License: MIT/X
# Strongly based on the ruby build systems. Thanks Lucas!

package Debian::Debhelper::Buildsystem::lua;

use strict;
use base 'Debian::Debhelper::Buildsystem';

my $DH_LUA_MAKEFILE="/usr/share/dh-lua/make/dh-lua.Makefile.multiple";

sub DESCRIPTION { "Lua" }

sub check_auto_buildable { return 0 }

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

sub configure {
	my $this=shift;
	$this->doit_in_sourcedir("make", "--no-print-directory", "-f", $DH_LUA_MAKEFILE, "configure", @_);
}

sub build {
	my $this=shift;
	$this->doit_in_sourcedir("make", "--no-print-directory", "-f", $DH_LUA_MAKEFILE, "build", @_);
}

sub test {
	my $this=shift;
	if (defined($ENV{ADTTMP})) {
		$this->doit_in_sourcedir("make", "--no-print-directory", "-f", $DH_LUA_MAKEFILE, "autopkgtest", @_);
	} else {
		$this->doit_in_sourcedir("make", "--no-print-directory", "-f", $DH_LUA_MAKEFILE, "test", @_);
	}
}

sub install {
	my $this=shift;
	$this->doit_in_sourcedir("make", "--no-print-directory", "-f", $DH_LUA_MAKEFILE, "install", @_);
}

sub clean {
	my $this=shift;
	$this->doit_in_sourcedir("make", "--no-print-directory", "-f", $DH_LUA_MAKEFILE, "clean", @_);
}

1