Initial commit
[buildfarm-client.git] / EximBuild / Modules / Skeleton.pm
1
2 # Package Namespace is hardcoded. Modules must live in
3 # EximBuild::Modules
4
5 package EximBuild::Modules::Skeleton;
6
7 use EximBuild::Options;
8 use EximBuild::SCM;
9
10 use strict;
11
12 use vars qw($VERSION); $VERSION = 'REL_0.1';
13
14 my $hooks = {
15     'checkout' => \&checkout,
16     'setup-target' => \&setup_target,
17     'need-run' => \&need_run,
18     'configure' => \&configure,
19     'build' => \&build,
20     'check' => \&check,
21     'install' => \&install,
22     'installcheck' => \&installcheck,
23     'locale-end' => \&locale_end,
24     'cleanup' => \&cleanup,
25 };
26
27 sub setup
28 {
29     my $class = __PACKAGE__;
30
31     my $buildroot = shift; # where we're building
32     my $branch = shift; # The branch of exim that's being built.
33     my $conf = shift;  # ref to the whole config object
34     my $exim = shift; # exim build dir
35
36     # could even set up several of these (e.g. for different branches)
37     my $self  = {
38         buildroot => $buildroot,
39         eximbranch=> $branch,
40         bfconf => $conf,
41         exim => $exim
42     };
43     bless($self, $class);
44
45     # for each instance you create, do:
46     main::register_module_hooks($self,$hooks);
47
48 }
49
50 sub checkout
51 {
52     my $self = shift;
53     my $savescmlog = shift; # array ref to the log lines
54
55     print main::time_str(), "checking out ",__PACKAGE__,"\n" if $verbose;
56
57     push(@$savescmlog,"Skeleton processed checkout\n");
58 }
59
60 sub setup_target
61 {
62     my $self = shift;
63
64     # copy the code or setup a vpath dir if supported as appropriate
65
66     print main::time_str(), "setting up ",__PACKAGE__,"\n" if   $verbose;
67
68 }
69
70 sub need_run
71 {
72     my $self = shift;
73     my $run_needed = shift; # ref to flag
74
75     # to force a run do:
76     # $$run_needed = 1;
77
78     print main::time_str(), "checking if run needed by ",__PACKAGE__,"\n"
79       if        $verbose;
80
81 }
82
83 sub configure
84 {
85     my $self = shift;
86
87     print main::time_str(), "configuring ",__PACKAGE__,"\n" if  $verbose;
88 }
89
90 sub build
91 {
92     my $self = shift;
93
94     print main::time_str(), "building ",__PACKAGE__,"\n" if     $verbose;
95 }
96
97 sub install
98 {
99     my $self = shift;
100
101     print main::time_str(), "installing ",__PACKAGE__,"\n" if   $verbose;
102 }
103
104 sub check
105 {
106     my $self = shift;
107
108     print main::time_str(), "checking ",__PACKAGE__,"\n" if     $verbose;
109 }
110
111 sub installcheck
112 {
113     my $self = shift;
114     my $locale = shift;
115
116     print main::time_str(), "installchecking $locale",__PACKAGE__,"\n"
117       if        $verbose;
118 }
119
120 sub locale_end
121 {
122     my $self = shift;
123     my $locale = shift;
124
125     print main::time_str(), "end of locale $locale processing",__PACKAGE__,"\n"
126       if        $verbose;
127 }
128
129 sub cleanup
130 {
131     my $self = shift;
132
133     print main::time_str(), "cleaning up ",__PACKAGE__,"\n" if  $verbose > 1;
134 }
135
136 1;