ProjectBuilder
view release on metacpan or search on metacpan
lib/ProjectBuilder/Env.pm view on Meta::CPAN
%filteredfiles = %$filteredfiles if (defined $filteredfiles);
%supfiles = %$supfiles if (defined $supfiles);
#
# Get global Version/Tag
#
if (not defined $ENV{'PBPROJVER'}) {
if ((defined $pkgv) && (defined $pkgv->{$ENV{'PBPROJ'}})) {
$ENV{'PBPROJVER'}=$pkgv->{$ENV{'PBPROJ'}};
} else {
die "No projver found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb";
}
}
die "Invalid version name $ENV{'PBPROJVER'} in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb" if (($ENV{'PBPROJVER'} !~ /[0-9.]+/) && (defined $version) && ($ENV{'PBPROJVER'} =~ /$version{$ENV{'PBPROJ'}}/));
if (not defined $ENV{'PBPROJTAG'}) {
if ((defined $pkgt) && (defined $pkgt->{$ENV{'PBPROJ'}})) {
$ENV{'PBPROJTAG'}=$pkgt->{$ENV{'PBPROJ'}};
} else {
die "No projtag found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb";
}
}
die "Invalid tag name $ENV{'PBPROJTAG'} in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb" if ($ENV{'PBPROJTAG'} !~ /[0-9.]+/);
if (not defined $ENV{'PBPACKAGER'}) {
if ((defined $pbpackager) && (defined $pbpackager->{$ENV{'PBPROJ'}})) {
$ENV{'PBPACKAGER'}=$pbpackager->{$ENV{'PBPROJ'}};
} else {
die "No pbpackager found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb";
}
}
} else {
if (defined $pbinit) {
my @pkgs = @ARGV;
@pkgs = ("pkg1") if (not @pkgs);
open(CONF,"> $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb") || die "Unable to create $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb";
print CONF << "EOF";
#
# Project Builder configuration file
# For project $ENV{'PBPROJ'}
#
# \$Id\$
#
#
# What is the project URL
#
#pburl $ENV{'PBPROJ'} = svn://svn.$ENV{'PBPROJ'}.org/$ENV{'PBPROJ'}/devel
#pburl $ENV{'PBPROJ'} = svn://svn+ssh.$ENV{'PBPROJ'}.org/$ENV{'PBPROJ'}/devel
#pburl $ENV{'PBPROJ'} = cvs://cvs.$ENV{'PBPROJ'}.org/$ENV{'PBPROJ'}/devel
#pburl $ENV{'PBPROJ'} = http://www.$ENV{'PBPROJ'}.org/src/$ENV{'PBPROJ'}-devel.tar.gz
#pburl $ENV{'PBPROJ'} = ftp://ftp.$ENV{'PBPROJ'}.org/src/$ENV{'PBPROJ'}-devel.tar.gz
#pburl $ENV{'PBPROJ'} = file:///src/$ENV{'PBPROJ'}-devel.tar.gz
#pburl $ENV{'PBPROJ'} = dir:///src/$ENV{'PBPROJ'}-devel
# Repository
#pbrepo $ENV{'PBPROJ'} = ftp://ftp.$ENV{'PBPROJ'}.org
#pbml $ENV{'PBPROJ'} = $ENV{'PBPROJ'}-announce\@lists.$ENV{'PBPROJ'}.org
#pbsmtp $ENV{'PBPROJ'} = localhost
#pbgpgcheck $ENV{'PBPROJ'} = 1
# For distro supporting it, which area is used
#projcomponent $ENV{'PBPROJ'} = main
# Check whether project is well formed
# when downloading from ftp/http/...
# (containing already a directory with the project-version name)
#pbwf $ENV{'PBPROJ'} = 1
# Do we check GPG keys
#pbgpgcheck $ENV{'PBPROJ'} = 1
#
# Packager label
#
#pbpackager $ENV{'PBPROJ'} = William Porte <bill\@$ENV{'PBPROJ'}.org>
#
# For delivery to a machine by SSH (potentially the FTP server)
# Needs hostname, account and directory
#
#sshhost $ENV{'PBPROJ'} = www.$ENV{'PBPROJ'}.org
#sshlogin $ENV{'PBPROJ'} = bill
#sshdir $ENV{'PBPROJ'} = /$ENV{'PBPROJ'}/ftp
#sshport $ENV{'PBPROJ'} = 22
#
# For Virtual machines management
# Naming convention to follow: distribution name (as per ProjectBuilder::Distribution)
# followed by '-' and by release number
# followed by '-' and by architecture
# a .vmtype extension will be added to the resulting string
# a QEMU rhel-3-i286 here means that the VM will be named rhel-3-i386.qemu
#
#vmlist $ENV{'PBPROJ'} = asianux-2-i386,asianux-3-i386,mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,mandriva-2008.1-i386,mandriva-2009.0-i386,mandriva-2009.1-i386,mandriva-2...
#
# Valid values for vmtype are
# qemu, (vmware, xen, ... TBD)
#vmtype $ENV{'PBPROJ'} = qemu
# Hash for VM stuff on vmtype
#vmntp default = pool.ntp.org
# We suppose we can commmunicate with the VM through SSH
#vmhost $ENV{'PBPROJ'} = localhost
#vmlogin $ENV{'PBPROJ'} = pb
#vmport $ENV{'PBPROJ'} = 2222
# Timeout to wait when VM is launched/stopped
#vmtmout default = 120
# per VMs needed paramaters
#vmopt $ENV{'PBPROJ'} = -m 384 -daemonize
#vmpath $ENV{'PBPROJ'} = /home/qemu
#vmsize $ENV{'PBPROJ'} = 5G
#
# For Virtual environment management
# Naming convention to follow: distribution name (as per ProjectBuilder::Distribution)
# followed by '-' and by release number
# followed by '-' and by architecture
# a .vetype extension will be added to the resulting string
# a chroot rhel-3-i286 here means that the VE will be named rhel-3-i386.chroot
#
#velist $ENV{'PBPROJ'} = fedora-7-i386
# VE params
#vetype $ENV{'PBPROJ'} = chroot
#ventp default = pool.ntp.org
#velogin $ENV{'PBPROJ'} = pb
( run in 1.305 second using v1.01-cache-2.11-cpan-df04353d9ac )