/usr/sbin/gpt_extract_data is in grid-packaging-tools 3.6.7-1.
This file is owned by root:root, with mode 0o755.
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 | #! /usr/bin/perl
my ($prefix, $globus_prefix, $exec_prefix, $bindir, $sbindir, $libdir);
my ($datarootdir, $datadir, $perlmoduledir, $gptdatadir);
my ($gptexecsharedir, $amdir, $pkg_confdir, $aclocaldir);
if (exists $ENV{GPT_LOCATION})
{
$prefix = $ENV{GPT_LOCATION};
}
else
{
$prefix = "/usr";
}
if (exists $ENV{GLOBUS_LOCATION})
{
$globus_prefix = $ENV{GLOBUS_LOCATION};
}
else
{
$globus_prefix = "/usr";
}
$exec_prefix = "${prefix}";
$bindir = "${exec_prefix}/bin";
$sbindir = "${exec_prefix}/sbin";
$libdir = "${exec_prefix}/lib";
$datarootdir = "${prefix}/share";
$datadir = "${prefix}/share";
$perlmoduledir = "/usr/share/perl5";
$gptdatadir = "${datadir}/globus/gpt";
$gptexecsharedir = "${datadir}/globus/gpt";
$amdir = "${datadir}/globus/amdir";
$pkg_confdir = "${datadir}/globus/gpt";
$aclocaldir = "${datadir}/globus/aclocal";
unshift(@INC, "${perlmoduledir}");
use strict;
use Getopt::Long;
use Config;
#
# Do a perl check for version >= 5.005.
#
if ( ! ( defined eval "require 5.005" ) )
{
die "GPT requires at least Perl version 5.005";
}
if ( ! ( defined eval "require Grid::GPT::GPTObject" ) )
{
die("$prefix does not appear to hold a valid GPT installation\n");
}
require Pod::Usage;
my $VERSION = 0.01;
my ($name, $version,$build_env);
my $verbose = 0;
my ($help, $man);
# sub pod2usage {
# my $ex = shift;
# print "gpt_extract_data [-name -version -build_env -verbose -help] metadatafile\n";
# exit $ex;
# }
GetOptions( 'name' => \$name, 'version' => \$version,
'build_env' => \$build_env, 'verbose=i' => \$verbose,
'help' => \$help)
or Pod::Usage::pod2usage(1);
Pod::Usage::pod2usage(0) if $help;
require Grid::GPT::V1::Package;
require Grid::GPT::PackageFactory;
use Cwd;
my $srcfile = shift;
my $factory = new Grid::GPT::PackageFactory;
my $pkg = $factory->type_of_package($srcfile);
$pkg->read_metadata_file($srcfile);
print "GPT_NAME='$pkg->{'Name'}'\n" if defined $name;
print "GPT_MAJOR_VERSION='$pkg->{'Version'}->{'major'}'
GPT_MINOR_VERSION='$pkg->{'Version'}->{'minor'}'
GPT_AGE_VERSION='$pkg->{'Version'}->{'age'}'\n" if defined $version;
print "GPT_CFLAGS='$pkg->{'cflags'}'
GPT_INCLUDES='$pkg->{'external_includes'}'
GPT_LIBS='$pkg->{'external_libs'}'
GPT_BUILD_WITH_FLAVORS='$pkg->{'With_Flavors'}'\n" if defined $build_env;
__END__
=head1 NAME
B<gpt_extract_data> - Print out package metadata as shell variables
=head1 SYNOPSIS
gpt_extract_data [--name --version --build_env ] pkg_data_file
=head1 DESCRIPTION
B<gpt_extract_data> Print out package metadata as shell variables.
=head1 OPTIONS
=over 4
=item name
Print out GPT_NAME= the name of the package.
=item version
Print out version numbers as GPT_MAJOR_VERSION, GPT_MINOR_VERSION, and
GPT_AGE_VERSION variables.
=item build_env
Print out build environment as GPT_CFLAGS, GPT_INCLUDES, and GPT_LIBS.
=back
=head1 AUTHOR
Michael Bletzinger E<lt>mbletzin.ncsa.uiuc.eduE<gt> and Eric Blau
E<lt>eblau.ncsa.uiuc.eduE<gt>
=cut
|