line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# vim: set ts=2 sw=2 tw=0: |
5
|
|
|
|
|
|
|
# vim: set expandtab: |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Rex::Apache::Build::Base; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
1436
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
10
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
13
|
1
|
|
|
1
|
|
9
|
use Rex::Commands::Gather; |
|
1
|
|
|
|
|
79657
|
|
|
1
|
|
|
|
|
9
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
0
|
|
|
0
|
0
|
|
my $that = shift; |
17
|
0
|
|
0
|
|
|
|
my $proto = ref($that) || $that; |
18
|
0
|
|
|
|
|
|
my $self = { @_ }; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my %sys_info = get_system_information(); |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
0
|
|
|
|
$self->{maintainer} ||= ($ENV{USER} || "unknown"); |
|
|
|
0
|
|
|
|
|
23
|
|
|
|
|
|
|
$self->{arch} ||= $sys_info{architecture}, |
24
|
0
|
|
0
|
|
|
|
$self->{section} ||= "none"; |
|
|
|
0
|
|
|
|
|
25
|
0
|
|
0
|
|
|
|
$self->{url} ||= "http://example.tld/"; |
26
|
0
|
|
0
|
|
|
|
$self->{version} ||= "1.0"; |
27
|
0
|
|
0
|
|
|
|
$self->{description} ||= "No Description"; |
28
|
0
|
|
0
|
|
|
|
$self->{target} ||= "linux"; |
29
|
0
|
|
0
|
|
|
|
$self->{depends} ||= []; |
30
|
0
|
|
0
|
|
|
|
$self->{provides} ||= []; |
31
|
0
|
|
0
|
|
|
|
$self->{conflicts} ||= []; |
32
|
0
|
|
0
|
|
|
|
$self->{config_files} ||= []; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
0
|
|
|
|
$self->{exclude} ||= []; |
35
|
0
|
|
|
|
|
|
push(@{ $self->{exclude} }, qr{^Rexfile$}, qr{^Rexfile\.lock$}, qr{^\.git}, qr{^\.svn}, qr{.*~$}, qr{\.sw[a-z]$}, qr{^tmp$}, qr{\.cache$}); |
|
0
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
0
|
|
0
|
|
|
|
$self->{source} ||= "."; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
bless($self, $proto); |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return $self; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
for my $name (qw/ |
46
|
|
|
|
|
|
|
path |
47
|
|
|
|
|
|
|
source |
48
|
|
|
|
|
|
|
release |
49
|
|
|
|
|
|
|
epoch |
50
|
|
|
|
|
|
|
version |
51
|
|
|
|
|
|
|
vendor |
52
|
|
|
|
|
|
|
license |
53
|
|
|
|
|
|
|
depends |
54
|
|
|
|
|
|
|
conflicts |
55
|
|
|
|
|
|
|
provides |
56
|
|
|
|
|
|
|
arch |
57
|
|
|
|
|
|
|
target |
58
|
|
|
|
|
|
|
description |
59
|
|
|
|
|
|
|
section |
60
|
|
|
|
|
|
|
url |
61
|
|
|
|
|
|
|
post_install |
62
|
|
|
|
|
|
|
pre_install |
63
|
|
|
|
|
|
|
post_uninstall |
64
|
|
|
|
|
|
|
pre_uninstall |
65
|
|
|
|
|
|
|
exclude |
66
|
|
|
|
|
|
|
maintainer |
67
|
|
|
|
|
|
|
priority |
68
|
|
|
|
|
|
|
name |
69
|
|
|
|
|
|
|
config_files |
70
|
|
|
|
|
|
|
file_user |
71
|
|
|
|
|
|
|
file_group |
72
|
|
|
|
|
|
|
/) { |
73
|
1
|
|
|
1
|
|
706
|
no strict 'refs'; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
104
|
|
74
|
|
|
|
|
|
|
*{__PACKAGE__ . "::$name"} = sub { |
75
|
0
|
|
|
0
|
|
|
my ($self, $data) = @_; |
76
|
|
|
|
|
|
|
|
77
|
0
|
0
|
|
|
|
|
if($data) { |
78
|
0
|
|
|
|
|
|
$self->{$name} = $data; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
$self->{$name}; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
}; |
84
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
114
|
|
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub prefix { |
88
|
0
|
|
|
0
|
0
|
|
my ($self, $prefix) = @_; |
89
|
|
|
|
|
|
|
|
90
|
0
|
0
|
|
|
|
|
if($prefix) { |
91
|
0
|
|
|
|
|
|
$self->{prefix} = $prefix; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
0
|
|
0
|
|
|
|
return $self->{prefix} || $self->{path}; |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub build { |
98
|
0
|
|
|
0
|
0
|
|
my ($self, $target) = @_; |
99
|
0
|
|
|
|
|
|
die("Must be implemented by Class."); |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
1; |