]> andersk Git - gssapi-openssh.git/blame - openssh/make_gpt_dist
o Updates to make the source package build script more flexible.
[gssapi-openssh.git] / openssh / make_gpt_dist
CommitLineData
828950b9 1#!/usr/bin/env perl
2
3#GPT_LOCATION and/or GLOBUS_LOCATION must be specified for most scripts
4#in the globus packages. for this reason, this script tests to see if
5#one of the two locations is defined.
6
7my $gpath=$ENV{GPT_LOCATION};
8
9if(!defined($gpath))
10{
11 $gpath=$ENV{GLOBUS_LOCATION};
12}
13
14if(!defined($gpath))
15{
16 die "GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script";
17}
18
19#uncomment when we're more mature
20#for my $subdir ('packaging_tools', 'package_management', 'archive_compress') {
21# chdir "$subdir" or die "Unable to cd to $subdir: $?";
22# if(-e "config.cache")
23# {
24# #config.cache is tested for because it is generated when ./configure is executed
25# #if config.cache is present, then a make distclean must be performed in order
26# #to remove the cache. if a make distclean is run and config.cache is not
27# #present, then this script will recieve a zero from the system and error.
28#
29# system("make distclean");
30# }
31#
32# chdir ".." or die "Unable to cd to packaging: $?";
33#}
34
35# determine gpt version number
36#uncomment when we've got a better place to get the current version from
37#open (CFG, 'packaging_tools/configure.in');
38#
39#my $version;
40#for (<CFG>) {
41# if (m!AM_INIT_AUTOMAKE\(\w+,([^,\)]+)!) {
42# $version = $1;
43# $version =~ s!\s+!!g;
44# }
45#}
46
03f2799b 47printf("moving files into source directory...\n");
48system("mkdir ../gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?";
49system("cp -rf * ../gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?";
50system("mv ../gpt-gsi-openssh ./gpt-gsi-openssh")==0 or die "Unable to move directory: $?";
51
52chdir("./gpt-gsi-openssh");
53
7a19f317 54printf("running autoheader...\n");
55system("autoheader")==0 or die "Could not run autoheader: $?";
56
57printf("running autoconf...\n");
58system("autoconf")==0 or die "Could not run autoheader: $?";
59
828950b9 60#system("tar -cf gpt-$version.tar gpt-$version")==0 or die "Unable to create gpt_bundle.tar: $?";
61#system("gzip -f gpt-$version.tar")==0 or die "Unable to gzip gpt_bundle.tar: $?";
62#system("rm -rf gpt-$version")==0 or die "Unable to create gpt_bundle.tar: $?";
63
03f2799b 64printf("pruning source directory of extraneous files...\n");
65system("rm -rf `find . -name CVS -print`")==0 or die "Unable to remove cvs directories: $?";
66system("rm -f ./make_gpt_dist")==0 or die "Unable to remove gpt script: $?";
67system("rm -rf ./gpt")==0 or die "Unable to remove gpt directory: $?";
68
69chdir("../");
70
7a19f317 71printf("creating source tarball... gsi-openssh.\n");
828950b9 72system("tar -cf gsi-openssh.tar ./gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?";
73system("gzip -f gsi-openssh.tar")==0 or die "Unable to gzip gpt_bundle.tar: $?";
74system("rm -rf ./gpt-gsi-openssh")==0 or die "Unable to create gpt_bundle.tar: $?";
This page took 0.065903 seconds and 5 git commands to generate.