#!/usr/bin/env perl

##**************************************************************
##
## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
## University of Wisconsin-Madison, WI.
## 
## Licensed under the Apache License, Version 2.0 (the "License"); you
## may not use this file except in compliance with the License.  You may
## obtain a copy of the License at
## 
##    http://www.apache.org/licenses/LICENSE-2.0
## 
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
##**************************************************************



# This script performs all steps necessary to take the release.tar
# files for whatever platforms you want and put them onto the web as
# the completed binary release with all the right support files, name,
# etc, etc.  Read the README file in this directory for details on how
# to release a new patch level or revision of Condor.
#
# This should be run in the top-level src directory.
#
use strict;
use warnings;

use Getopt::Long;

sub runcmd($$);
sub print_usage();

# Autoflush the output
$| = 1;

use vars qw/ $opt_help $opt_sys $opt_version $opt_libc $opt_tarcmd $opt_cpcmd $opt_slinkcmd $opt_target $opt_linktype $opt_arch $opt_opsys $opt_platform /;

GetOptions ( 'help'              => \$opt_help,
             'sys=s'             => \$opt_sys,
             'version=s'         => \$opt_version,
             'libc=s'            => \$opt_libc,
             'tarcmd=s'          => \$opt_tarcmd,
             'cpcmd=s'           => \$opt_cpcmd,
             'slinkcmd=s'        => \$opt_slinkcmd,
             'linktype=s'        => \$opt_linktype,
             'target=s'          => \$opt_target,
             'arch=s'            => \$opt_arch,
             'opsys=s'           => \$opt_opsys,
             'platform=s'        => \$opt_platform,
			 );

# Deal with any command-line args we are passed:

my ( $sys, $versarg, $libc, $tar_cmd, $cp_cmd, $slink_cmd, $target,
	 $arch, $opsys, $platform );

if (defined($opt_help)) {
    print_usage(); exit 0;
}
if (defined($opt_sys)) {
    $sys = $opt_sys;
}
if (defined($opt_version)) {
    $versarg = $opt_version;
}
if (defined($opt_libc)) {
    $libc = $opt_libc;
}
if (defined($opt_tarcmd)) {
    $tar_cmd = $opt_tarcmd;
}
if (defined($opt_cpcmd)) {
    $cp_cmd = $opt_cpcmd;
}
if (defined($opt_slinkcmd)) {
    $slink_cmd = $opt_slinkcmd;
}
if (defined($opt_target)) {
    $target = $opt_target;
}
if (defined($opt_arch)) {
    $arch = $opt_arch;
}
if (defined($opt_opsys)) {
    $opsys = $opt_opsys;
}
if (defined($opt_platform)) {
    $platform = $opt_platform;
}

my @linktypes;
if (defined($opt_linktype)) {
   @linktypes = split /,/, $opt_linktype;
} else {
   # set up a default of everything
   @linktypes = 
      ("static", "dynamic", "unstripped-dynamic");
}

# Now, grab the version of this release.
my $vers_string;
if( $versarg ) {
    $vers_string = $versarg;
} else {
    # If we weren't told on the command line, use the condor_master
    # binary with -version to find the version string.
    if( -f "release_dir/sbin/condor_master" ) {
        $vers_string=`./release_dir/sbin/condor_master -version`;
    } elsif ( -f "static_dir/sbin/condor_master" ) {
        $vers_string=`./static_dir/sbin/condor_master -version`;
    } elsif ( -f "strip_dir/sbin/condor_master" ) {
        $vers_string=`./strip_dir/sbin/condor_master -version`;
    } else {
	die "ERROR: can't find a condor_version, and no -v specified";
    }
    if( ! $vers_string ) {
	die "ERROR: Can't find version string, and no -v specified";
    }
}

$vers_string =~ /(.*\$CondorVersion: )?(\d+)\.(\d+)\.(\d+).*/;
my $majorv = $2;
my $minorv = $3;
my $releasev = $4;
my $version = "$majorv.$minorv.$releasev";

if( $version =~ /(\d+)\.(\d+)\.(\d+)/ ) {
    print "Making final tarballs for Condor Version $version\n";
} else {
    die "ERROR: Can't parse the version string!";
}

# Things you should probably leave alone:
require 5.002;

######################################################################
# Settings you may want to customize
######################################################################

# These are the modules you actually want to build.

# The modules hash format is thus:
# The toplevel keys in the %modules hash are the names of the modules you'd
# like to build. These names end up as the first thing in the file name
# if the finished tarball, so "condor" as a module name will end up like:
# condor-6.8.5-....
# Then the hash table defined by the module key must contain these keys:
#	generate skelfiles tarfile releaselocation
# Their description is as such:
#	generate
#		This is used for debugging this script. Set it to 0 to not build
#		the module. Set it to 1 to build it.
#	skelfiles
#		This is an array of objects to copy from the source skeleton directory
#		to the destination directory (which will eventually become the final
#		tarball). An object will either be a bare string, in which case that
#		means to copy the string from the $realskel directory into the
#		destination directory and have it be named the same thing, or the
#		object will be an array which contains the source file and the 
#		destination filename. In the case of the array, the source file is
#		found relative to the cwd of the script. In any case, the source file
#		may be a directory, in which cse it is recursively copied.
#		NOTE: There is no way to specify an absolute path or files deeper in 
#		the $realskel directory.
#	tarfile
#		This is an array where the first index is the name of the Makefile
#		generated tarball that this script is packaging. This is the tarfile
#		name searched for in each release location. The second value of the
#		array is whether or not you want the tarfile untarred or not into
#		the destination directory.
#	releaselocation
#		The key of this hash is one of these linktype specifiers:
#			static dynamic unstripped-dynamic 
#		The value is the src/ directory name of where that linktype had been
#		produced. For example, the "dynamic" linktype means the stripped
#		dynamically linked executables, which are found in src/strip_dir
#		after "make stripped" completes.

my %modules =
(
	 "condor" =>
	 {
		 "generate" => 1,

		 "skelfiles" => [ "README", "DOC", "INSTALL", "LICENSE",
						  { src => "sbin/condor_configure",
							dest => "condor_configure",
							symlink => 1, },
						  { src => "sbin/condor_configure",
							dest => "condor_install",
							symlink => 1, },
						  "examples" 
						],

         "tarfile" => { file => "release.tar", extract => 1 },

         "releaselocation" => {
			 "dynamic"			  => "strip_dir",
			 "static"    	      => "static_dir",
			 "unstripped-dynamic" => "release_dir",
		 },
	 },
	
	 "condordebugsyms" =>
	 {
		 "generate" => 1,

		 "skelfiles" => [ "DOC", "INSTALL", "LICENSE",
						  { src => "condor_release/README.debugsyms",
							dest => "README" }, 
						],

		 "tarfile" => { file => "debugsyms.tar", extract => 1 },

		 # Currently, this module exists only for the 'dynamic' linktype.
		 "releaselocation" => {
			 "dynamic"       => "strip_dir",
		 },
	 },
);

######################################################################
# The rest of these settings can probably stay just like they are.
######################################################################

# Some paths of interest:
my $skel="release_skeleton";
my $realskel="condor_release";

# Convert from AFS @sys names to our names for the tarballs.
my %opsysname = (
  "condor_ppc_rhel3" => "linux",
  "condor_ppc_sles9" => "linux",
  "condor_ppc_yd30" => "linux",
  "condor_ppc_yd50" => "linux",
  "i386_centos42"   => "linux",
  "i386_centos43"   => "linux",
  "i386_centos44"   => "linux",
  "i386_centos45"   => "linux",
  "i386_debian40"   => "linux",
  "i386_debian50"   => "linux",
  "i386_f10"       => "linux",
  "i386_f7"       => "linux",
  "i386_f8"       => "linux",
  "i386_f9"       => "linux",
  "i386_fc1"       => "linux",
  "i386_fc2"       => "linux",
  "i386_fc3"       => "linux",
  "i386_fc4"       => "linux",
  "i386_fc5"       => "linux",
  "i386_fc6"       => "linux",
  "i386_freebsd4" => "freebsd4",
  "i386_freebsd5" => "freebsd5",
  "i386_freebsd6" => "freebsd6",
  "i386_freebsd7" => "freebsd7",
  "i386_macosx103"   => "MacOSX10.3",
  "i386_macosx104"   => "MacOSX10.4",
  "i386_macosx105"   => "MacOSX10.5",
  "i386_rh72"     => "linux",
  "i386_rh80"     => "linux",
  "i386_rh9"      => "linux",
  "i386_rhel3"    => "linux",
  "i386_rhel4"    => "linux",
  "i386_rhel51"   => "linux",
  "i386_rhel5"    => "linux",
  "i386_tao1"     => "linux",
  "ia64_rh72"     => "linux",
  "ia64_rhel3"    => "linux",
  "ia64_sles81"   => "linux",
  "ppc_macosx103"    => "MacOSX10.3",
  "ppc_macosx104"    => "MacOSX10.4",
  "x86_64_debian40" => "linux",
  "x86_64_debian50" => "linux",
  "x86_64_f10"       => "linux",
  "x86_64_f7"       => "linux",
  "x86_64_f8"       => "linux",
  "x86_64_f9"       => "linux",
  "x86_64_fc1"       => "linux",
  "x86_64_fc2"       => "linux",
  "x86_64_fc3"       => "linux",
  "x86_64_fc4"       => "linux",
  "x86_64_fc5"       => "linux",
  "x86_64_fc6"       => "linux",
  "x86_64_macosx105"   => "MacOSX10.5",
  "x86_64_macosx106"   => "MacOSX10.6",
  "x86_64_rhel3"  => "linux",
  "x86_64_rhel4"  => "linux",
  "x86_64_rhel5"  => "linux",
  "x86_64_rhel51" => "linux",
);

my %archname = (
  "condor_ppc_rhel3" => "PPC",
  "condor_ppc_sles9" => "PPC",
  "condor_ppc_yd30" => "PPC",
  "condor_ppc_yd50" => "PPC",
  "i386_centos42"   => "x86",
  "i386_centos43"   => "x86",
  "i386_centos44"   => "x86",
  "i386_centos45"   => "x86",
  "i386_debian40"   => "x86",
  "i386_debian50"   => "x86",
  "i386_f10"       => "x86",
  "i386_f7"       => "x86",
  "i386_f8"       => "x86",
  "i386_f9"       => "x86",
  "i386_fc1"       => "x86",
  "i386_fc2"       => "x86",
  "i386_fc3"       => "x86",
  "i386_fc4"       => "x86",
  "i386_fc5"       => "x86",
  "i386_fc6"       => "x86",
  "i386_freebsd4" => "x86",
  "i386_freebsd5" => "x86",
  "i386_freebsd6" => "x86",
  "i386_freebsd7" => "x86",
  "i386_macosx103"   => "x86",
  "i386_macosx104"   => "x86",
  "i386_macosx105"   => "x86",
  "i386_rh72"     => "x86",
  "i386_rh80"     => "x86",
  "i386_rh9"      => "x86",
  "i386_rhel3"    => "x86",
  "i386_rhel4"    => "x86",
  "i386_rhel51"       => "x86",
  "i386_rhel5"    => "x86",
  "i386_tao1"     => "x86",
  "ia64_rh72"     => "ia64",
  "ia64_rhel3"    => "ia64",
  "ia64_sles81"   => "ia64",
  "ppc_macosx103"    => "PPC",
  "ppc_macosx104"    => "PPC",
  "x86_64_debian40" => "x86_64",
  "x86_64_debian50" => "x86_64",
  "x86_64_f10"       => "x86_64",
  "x86_64_f7"       => "x86_64",
  "x86_64_f8"       => "x86_64",
  "x86_64_f9"       => "x86_64",
  "x86_64_fc1"       => "x86_64",
  "x86_64_fc2"       => "x86_64",
  "x86_64_fc3"       => "x86_64",
  "x86_64_fc4"       => "x86_64",
  "x86_64_fc5"       => "x86_64",
  "x86_64_fc6"       => "x86_64",
  "x86_64_macosx105"   => "x86_64",
  "x86_64_macosx106"   => "x86_64",
  "x86_64_rhel3"  => "x86_64",
  "x86_64_rhel4"  => "x86_64",
  "x86_64_rhel51"  => "x86_64",
  "x86_64_rhel5"  => "x86_64",
  "x86_64_rhel51"  => "x86_64",
);


# NOTE: any two entries in here with the same arch *MUST* have
# seperate values, or else we get identically named files and that's
# no good at all!
my %libcname = (
  "condor_ppc_rhel3" => "glibc23",
  "condor_ppc_sles9" => "sles9",
  "condor_ppc_yd30" => "yd30",
  "condor_ppc_yd50" => "yd50",
  "i386_centos42" => "centos42",
  "i386_centos43" => "centos43",
  "i386_centos44" => "centos44",
  "i386_centos45" => "centos45",
  "i386_debian40"   => "debian40",
  "i386_debian50"   => "debian50",
  "i386_f7"     => "fedora7",
  "i386_f8"     => "fedora8",
  "i386_f9"     => "fedora9",
  "i386_fc1"     => "fedoracore1",
  "i386_fc2"     => "fedoracore2",
  "i386_fc3"     => "fedoracore3",
  "i386_fc4"     => "fedoracore4",
  "i386_fc5"     => "fedoracore5",
  "i386_fc6"     => "fedoracore6",
  "i386_rh72"   => "glibc22",
  "i386_rh80"   => "redhat80",
  "i386_rh9"    => "glibc23",
  "i386_rhel3"  => "rhel3",
  "i386_rhel51"       => "rhel51",
  "i386_rhel5"  => "rhel5",
  "i386_tao1"   => "tao1",
  "ia64_rh72"   => "glibc22",
  "ia64_rhel3"  => "rhel3",
  "ia64_sles81" => "sles81",
  "x86_64_debian40"  => "debian40",
  "x86_64_debian50"  => "debian50",
  "x86_64_f7"     => "fedora7",
  "x86_64_f8"     => "fedora8",
  "x86_64_f9"     => "fedora9",
  "x86_64_fc1"     => "fedoracore1",
  "x86_64_fc2"     => "fedoracore2",
  "x86_64_fc3"     => "fedoracore3",
  "x86_64_fc4"     => "fedoracore4",
  "x86_64_fc5"     => "fedoracore5",
  "x86_64_fc6"     => "fedoracore6",
  "x86_64_rhel3"   => "rhel3",
  "x86_64_rhel4"   => "rhel4",
  "x86_64_rhel5"   => "rhel5",
  "x86_64_rhel51"  => "rhel51",
);

# #########################
# Sanity check the tables
# #########################
my %sysnames;
foreach my $key ( keys %opsysname, keys %archname, keys %libcname ) {
	$sysnames{$key} = 1;
}

my $errors = 0;
foreach my $key ( keys %sysnames ) {
	if ( !exists $archname{$key} ) {
		print STDERR "'$key' not in archname table\n";
		$errors++;
	}
	if ( !exists $opsysname{$key} ) {
		print STDERR "'$key' not in opsysname table\n";
		$errors++;
	}
	if ( !exists $libcname{$key} ) {
		$libcname{$key} = "";
	}
}
foreach my $key ( keys %sysnames ) {
	foreach my $key2 ( keys %sysnames ) {
		if( ( $key ne $key2 )  and
			( exists $archname{$key} ) and
			( exists $archname{$key2} ) and
			( exists $libcname{$key} ) and
			( exists $libcname{$key2} ) and
			( $libcname{$key} ne "" ) and
			( $archname{$key} eq $archname{$key2} ) and
			( $libcname{$key} eq $libcname{$key2} ) ) {
			print STDERR
				"Duplicate libc for '$key' and '$key2' '$libcname{$key}'\n";
			$errors++;
		}
	}
}
die "$errors table error(s) found\n" if( $errors );


umask(022);

######################################################################
# Actual work begins...
######################################################################

if( ! $target) {
   $target="/p/condor/public/binaries";
}

# Make sure we know what platform we are... If we weren't told on the
# command-line, run "sys" and use that.
if( ! $sys ) {
    $sys=`sys`;
    chomp($sys);
}
if( ( !defined $platform )  or  ( $platform eq "" ) ) {
	if ( !exists $archname{$sys} ) {
		my @t;
		push( @t, "platform" )         if ( !defined $platform );
		push( @t, "architecture" )     if ( !defined $arch );
		push( @t, "libc" )             if ( !defined $libc );
		push( @t, "operating system" ) if ( !defined $opsys );
		if ( scalar @t ) {
			die join(", ", @t ) . " not defined and '$sys' not in the tables";
		}
	}

	$arch = $archname{$sys}   if( !defined $arch );
	$opsys = $opsysname{$sys} if( !defined $opsys );
	$libc = $libcname{$sys}   if( !defined $libc );

	$platform="$opsys-$arch";
	if( $libc ne "" ) {
		$platform .= "-$libc";
	}
}

if( ! $tar_cmd ) {
    $tar_cmd = "tar --owner=root --group=root";
}
if( ! $cp_cmd ) {
	# the condor build system always tells us the right thing, so
	# hopefully we never hit this code.  however, if we need a default,
	# it really depends on if we're using GNU cp or not.  on linux, we
	# can safely use the GNU flags, and on the others, we'll just have
	# to live without and hope for the best.  luckily, the configure
	# script figures it out for us and tells us, so it's not really an
	# issue inside here anymore...
	if( $opsys =~ /.*linux.*/ ) {
		$cp_cmd = "cp -rL"; 
	} else {  
		$cp_cmd = "cp -r"; 
	} 

}
if( ! $slink_cmd ) {
    $slink_cmd = "ln -s"; 
}

`rm -rf $skel`;

mkdir( "$skel", 0777 ) || die "Can't mkdir($skel): $!\n";

my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$mon++;
my $date="$mon/$mday/$year";
 
print "Building linktype(s): ".join(" ",@linktypes)."\n";

foreach my $name ( sort keys %modules ) {

	my $module = $modules{$name};

    die "Define generate for $name" 
		if( !exists($module->{generate}) );

	if ($module->{generate} != 1) {
		print "Skipping the processing of module: $name\n";
		next;
	}

	print "Processing module: $name\n";

    my $release="$name-$version";

    die "Define a tarfile for $name" 
		if( !exists($module->{tarfile}) );

	# the first argument is the tarfile, the second is whether or not we
	# should untar it.
	my $tarfile = $module->{tarfile}{file};
	my $extract = $module->{tarfile}{extract};

	# Setup the skeleton directory
    print "Setting up skeleton directory for \"$name\"...\n";
	mkdir("$skel/$release", 0777) || 
		die "Can't mkdir($skel/$release): $!";

    # Now, copy over any files specified for a given module
    foreach my $file ( @{$module->{skelfiles}} ) {
		
		my ($src,$dest,$symlink);
		if (ref($file) eq "HASH") {
			$src =  $file->{src};
			$dest = $file->{dest};
			$symlink = $file->{symlink};
		} else {
	   	 	$src = "$realskel/$file";
	   	 	$dest = $file;
		}
		# Must be able to do recursive copy in case of directories...
		if ( defined $symlink ) {
			runcmd("date && time $slink_cmd $src $skel/$release/$dest", undef);
		} else {
			runcmd("date && time $cp_cmd $src $skel/$release/$dest", undef);
		}
    }
    runcmd("rm -rf $skel/$release/CVS", 1);
    runcmd("rm -rf $skel/$release/*/CVS", 1);
    runcmd("rm -rf $skel/$release/*/*/CVS", 1);
    print "done.\n";

    # Now, handle static and/or dynamic versions, whatever exists... 
	my $relloc = $module->{releaselocation};
	print "Building specified linktypes versions of release tarballs\n";

    foreach my $linktype ( @linktypes ) {
		my @clean_dirs = qw( lib libexec bin sbin sql );

		# If the modules doesn't provide a release for this linktype, just
		# ignore it.
		if (!exists($relloc->{$linktype})) {
			print "Module $name doesn't support linktype '$linktype'. " .
				"Ignoring.\n";
			next;
		}

		my $tarball = $relloc->{$linktype}."/$tarfile";
		print "Building $linktype from $tarball\n";

		# Make sure the proper tar file exists
		if( ! (-d $relloc->{$linktype} && -f $tarball) ){
	    	print STDERR "There's no $tarfile file for $linktype on ".
				"this platform, skipping.\n";
	    	next;
		}

		# Pre cleanup
		print "Making sure that $skel/$release is clean\n";
		my $clean_cmd = "rm -fr ";
		foreach my $dir ( @clean_dirs ) {
			$clean_cmd .= "$skel/$release/$dir ";
		}
		print runcmd( $clean_cmd, undef );

		# Figure out what our filenames should look like.
		my $full = $platform;
		if( $linktype =~ /dynamic/ ) {
	    	$full .= "-dynamic";
		}
		if( $linktype =~ /unstripped/ ) {
	    	$full .= "-unstripped";
		}

		# List of directories to clean up
		if ( $extract ) {
			# If I've asked for this tarball to have been untarred, then 
			# untar it into the skeleton directory
			print "Untaring tarfile into skeleton.\n";
			# This runs in a subshell as to not distub the cwd of the script
			print runcmd( "( cd $skel/$release && " .
						  "  time $tar_cmd -xf ../../$tarball )",
						  undef );
		} else {
			# Otherwise just copy the tarfile with the right permissions into
			# the skeleton.

			print "Copying tarfile into skeleton.\n";

			# So one may run this script over and over, we will do a copy
			# here instead of a move, otherwise the toplevel makefile will
			# have to be called again to rebuild the source file.

			runcmd("date && time dd " .
				   "if=$tarball " .
				   "of=$skel/$release/$tarfile bs=10485760",
				   undef);
		}

		# Create full archive 
		print "Creating the full archive $skel/$release.tar\n";
		# This runs in a subshell as to not distub the cwd of the script
		print runcmd("(cd $skel && time $tar_cmd -cvf $release.tar $release)",
					 undef);

		# Delete the release.tar we're now done with.
		print "Cleaning up some files...\n";
		runcmd("unlink $skel/$release/$tarfile", 1);
		print runcmd( $clean_cmd, undef );

		print "Renaming tarball to archecture specific name.\n";
		runcmd("date && ".
			   "time mv $skel/$release.tar $skel/$release-$full.tar",
			   undef);
	
		# Figure out where we want put this tarball
		my $targetdir;
		if( $name =~ /condor/ ) {
	    	$targetdir = "$target/v$majorv.$minorv";
		} else {
	    	$targetdir = "$target/contrib";
		}
		if( ! -d $target ) {
	    	print "mkdir($target, 0777)\n";
	    	mkdir( $target, 0777 ) || die "Can't mkdir $target: $!\n";
		}
		if( ! -d $targetdir ) {
	    	print "mkdir($targetdir, 0777)\n";
	    	mkdir( $targetdir, 0777 ) || die "Can't mkdir $targetdir: $!\n";
		}
		my $targetfile = "$targetdir/$release-$full.tar";

		# Make sure there's nothing in the way where we want to put it.
		runcmd("unlink $targetfile", 1);
		runcmd("unlink $targetfile.Z", 1);
		runcmd("unlink $targetfile.gz", 1);

		# gzip, and move to the final location.  we no longer bother
		# with trying to use compress on non-linux platforms, since
		# it's not unreasonable to require gzip in this day and age.
		# we already check for gzip (but not compress) on our build
		# machines @ configure time, and some of our platforms don't
		# put compress in a reasonable location... :(
		runcmd("date && time gzip $skel/$release-$full.tar", undef);

		print "Moving $release-$full.tar.gz into $targetdir\n";
		runcmd("date && time mv $skel/$release-$full.tar.gz $targetdir",
			   undef);
		print "done.\n";
	}
}

exit 0;


# WARNING: If /usr/bin/time is not installed then doing `time` fails,
# but doing `date && time` is safe, so if you want to runcmd("time
# ..") you should runcmd("date && time ..")

# The first argument is the command for the shell to execute.
# The presence of the second argument, means don't die if the command fails.
# Returns the output of the program, if any.
sub runcmd($$) {
	my ($cmd, $shouldnt_die) = @_;
	my (@out);

	die "Can't execute undefined command!"
		if (!defined($cmd));

	print "$cmd\n";
	@out = `$cmd 2>&1`;

	# check if the person who runs the command doesn't care if it succeeds 
	# or not.
	if( ($? >> 8) != 0 ) {
		if (!defined($shouldnt_die)) {
			my $out = join("\n", @out);
	   		die "Can't $cmd: $out";
		}
	}

	return @out;
}

sub print_usage() {

    print <<END_USAGE;
--help
This screen

--sys=<System Name>

--version=<Condor Version String>

--libc=<libc name>

--tarcmd=<tar command with args>

--cpcmd=<cp command with args>

--target=<target location>

--linktype=<a set of one or more of:
   static, dynamic, unstripped-dynamic>

--arch=<architecture>

--opsys=<operating system name>

--platform=<platform name string>

END_USAGE
}

### Local Variables: ***
### mode:perl ***
### tab-width: 4  ***
### End: ***
