/usr/share/perl5/Grid/GPT/PkgMngmt/Build.pm is in grid-packaging-tools 3.6.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | package Grid::GPT::PkgMngmt::Build;
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
require Exporter;
require AutoLoader;
use Data::Dumper;
use Grid::GPT::PkgMngmt::Inform;
use Grid::GPT::PkgMngmt::BuildMacros;
use Cwd;
@ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
$VERSION = '0.01';
# Preloaded methods go here.
sub new {
my ($class, %arg) = @_;
my $me = {
srcobj => $arg{'srcobj'},
build_instructions => $arg{'build_instructions'} ||
[
{command => "MAKE_GPTMACRO distclean"},
{command => "GLOBUS_LOCATION=INSTALLDIR_GPTMACRO; export GLOBUS_LOCATION; CONFIGENV_GPTMACRO $arg{'srcobj'}->{'srcdir'}/configure CONFIGOPTS_GPTMACRO --with-flavor=FLAVOR_GPTMACRO STATIC_FLAG_GPTMACRO"},
{command => "GLOBUS_LOCATION=INSTALLDIR_GPTMACRO; export GLOBUS_LOCATION; MAKE_GPTMACRO"},
{command => "GLOBUS_LOCATION=INSTALLDIR_GPTMACRO; export GLOBUS_LOCATION; MAKE_GPTMACRO install"}
],
ignore_errors => $arg{'ignore_errors'},
locations => $arg{'locations'},
log => $arg{'log'},
name => $arg{'name'},
core => $arg{'core'},
};
bless $me, $class;
my $macros = $arg{'macros'};
if (! defined($arg{'build_instructions'})) {
$me->{'using default build instructions'}++;
}
# Add the install directory to the filelist
if (defined ($me->{'srcobj'}->{'filelist'})) {
$me->{'filelist'} = [];
for my $f (@{$me->{'srcobj'}->{'filelist'}}) {
chomp $f;
push @{$me->{'filelist'}}, $f;
}
}
$me->{'macros'} =
new Grid::GPT::PkgMngmt::BuildMacros(
srcobj => $arg{'srcobj'},
locations => $arg{'locations'},
user_macros => $macros,
log => $me->{'log'},
filelist => $me->{'filelist'},
static => $arg{'static'},
installed_flavors =>
$arg{'installed_flavors'},
flavor_choices =>
$arg{'flavor_choices'},
core => $arg{'core'},
);
return $me;
}
sub build {
my ($me, $flavor) = @_;
my $returning = 1;
my $startdir = cwd();
$me->{'log'}->announce("Changing to $me->{'srcobj'}->{'srcdir'}");
chdir $me->{'srcobj'}->{'srcdir'};
if (defined $flavor) {
$me->{'log'}->announce("BUILDING FLAVOR $flavor",1);
} else {
$me->{'log'}->announce("BUILDING $me->{'name'}",1);
}
for my $bs (@{$me->{'build_instructions'}}) {
my $build_step = $me->{'macros'}->expand($bs,$flavor);
next if ! defined $build_step;
# Perform the step
my $result = $me->{'log'}->action($build_step);
if ($result and $build_step !~ m!patch|clean!) {
if (defined $me->{'ignore_errors'}) {
$me->{'log'}->announce("...SKIPPING $flavor",1);
$returning = undef;
last;
} else {
#results are bad print them out.
die "ERROR: Build has failed\n";
}
}
}
chdir $startdir;
$me->{'log'}->announce("Changing to $startdir");
# Check for filelist.
$me->{'filelist'} = $me->{'macros'}->{'flavored_filelist'};
return $returning;
}
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
=head1 NAME
Grid::GPT::PkgMngmt:Build - Perl extension for building globus binaries.
=head1 SYNOPSIS
use Build;
blah blah blah
=head1 DESCRIPTION
Stub documentation for Build was created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.
Blah blah blah.
=head1 AUTHOR
A. U. Thor, a.u.thor@a.galaxy.far.far.away
=head1 SEE ALSO
perl(1).
=cut
|