Subversion Repositories DevTools

Rev

Rev 7299 | Rev 7301 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7299 Rev 7300
Line 1... Line 1...
1
########################################################################
1
########################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
3
#
3
#
4
# Module name   : create_dpkg.pl
4
# Module name   : create_dpkg.pl
5
# Module type   : Makefile system
5
# Module type   : Makefile system
6
# Compiler(s)   : Perl
6
# Compiler(s)   : Perl
7
# Environment(s): jats
7
# Environment(s): jats
Line 37... Line 37...
37
use JatsError;
37
use JatsError;
38
use JatsEnv;
38
use JatsEnv;
39
use DescPkg;
39
use DescPkg;
40
use FileUtils;
40
use FileUtils;
41
use JatsSystem;
41
use JatsSystem;
-
 
42
use JatsVersionUtils;
42
 
43
 
43
#
44
#
44
#   Under Windows we need the Win32::FileSecurity module
45
#   Under Windows we need the Win32::FileSecurity module
45
#   It only exists under windows
46
#   It only exists under windows
46
#
47
#
Line 61... Line 62...
61
# Global variables
62
# Global variables
62
#
63
#
63
my $DPKG_NAME     = "";
64
my $DPKG_NAME     = "";
64
my $DESC_NAME     = "";
65
my $DESC_NAME     = "";
65
my $DPKG_VERSION  = "";
66
my $DPKG_VERSION  = "";
-
 
67
my $DPKG_PRJ      = "";
66
my $DESCPKG_FILE  = "";
68
my $DESCPKG_FILE  = "";
67
my $DESCPKG_TYPE  = "";
69
my $DESCPKG_TYPE  = "";
68
my $CWD_DIR       = cwd;
70
my $CWD_DIR       = cwd;
69
my $SRC_ROOT;
71
my $SRC_ROOT;
70
my $DPKG_DIR;
72
my $DPKG_DIR;
Line 126... Line 128...
126
#       This sub-routine is used to generate a consistent informational log
128
#       This sub-routine is used to generate a consistent informational log
127
#------------------------------------------------------------------------------
129
#------------------------------------------------------------------------------
128
{
130
{
129
    my ($opr, $file) = @_;
131
    my ($opr, $file) = @_;
130
 
132
 
-
 
133
    $file =~ s/\Q$DPKG_DIR\E/PKGDIR/;
131
    $file =~ s/\Q$DPKG_ROOT\E/DPKG/;
134
    $file =~ s/\Q$DPKG_ROOT\E/DPKG/;
132
    $file =~ s/\Q$SRC_ROOT\E/PKG/;
135
    $file =~ s/\Q$SRC_ROOT\E/PKG/;
133
    $file =~ s/\Q$CWD_DIR\E/CWD/;
136
    $file =~ s/\Q$CWD_DIR\E/CWD/;
134
 
137
 
135
    Information (sprintf( "%-15s [%s]", $opr, $file));
138
    Information (sprintf( "%-15s [%s]", $opr, $file));
Line 456... Line 459...
456
    {
459
    {
457
        Error("Cannot determine dpkg_archive version number.",
460
        Error("Cannot determine dpkg_archive version number.",
458
              "Check JATS build config.");
461
              "Check JATS build config.");
459
    }
462
    }
460
 
463
 
-
 
464
    my ($pn, $pv, $ps ) = SplitPackage ($DPKG_NAME, $DPKG_VERSION );
-
 
465
    $DPKG_PRJ = '.' . $ps if ( $ps ); 
-
 
466
 
461
    #
467
    #
462
    #   Sanity test package name and version, if provided
468
    #   Sanity test package name and version, if provided
463
    #
469
    #
464
    if ( $opt_pname )
470
    if ( $opt_pname )
465
    {
471
    {
Line 513... Line 519...
513
    Information ("Repository    = [$DPKG_ROOT]");
519
    Information ("Repository    = [$DPKG_ROOT]");
514
    Information ("                *Non Standard archive") unless $opt_archive eq 'main';
520
    Information ("                *Non Standard archive") unless $opt_archive eq 'main';
515
    Information ("Target dir    = [$DPKG_DIR]");
521
    Information ("Target dir    = [$DPKG_DIR]");
516
    Information1("DPKG_NAME     = [$DPKG_NAME]");
522
    Information1("DPKG_NAME     = [$DPKG_NAME]");
517
    Information1("DPKG_VERSION  = [$DPKG_VERSION]");
523
    Information1("DPKG_VERSION  = [$DPKG_VERSION]");
-
 
524
    Information1("DPKG_PRJ      = [$DPKG_PRJ]");
518
    Information1("GBE_MACHTYPE  = [$GBE_MACHTYPE]");
525
    Information1("GBE_MACHTYPE  = [$GBE_MACHTYPE]");
519
    Information1("GBE_HOSTNAME  = [$GBE_HOSTNAME]");
526
    Information1("GBE_HOSTNAME  = [$GBE_HOSTNAME]");
520
    Information1("GBE_ABT       = [$GBE_ABT]");
527
    Information1("GBE_ABT       = [$GBE_ABT]");
521
    Information1("USER          = [$USER]");
528
    Information1("USER          = [$USER]");
522
    Information ("")                                if ( $opt_merge || $opt_delete || $opt_info || $opt_tarmode || $opt_testArchive || $opt_noBuild);
529
    Information ("")                                if ( $opt_merge || $opt_delete || $opt_info || $opt_tarmode || $opt_testArchive || $opt_noBuild);
Line 1364... Line 1371...
1364
{
1371
{
1365
    unless ( $opt_test )
1372
    unless ( $opt_test )
1366
    {
1373
    {
1367
        if ($opt_tarmode)
1374
        if ($opt_tarmode)
1368
        {
1375
        {
1369
            Information("Creating dpkg_archive tarball:", $DPKG_DIR);
1376
            LogFileOp("Creating dpkg_archive tarball:", $DPKG_DIR);
1370
            CreateDpkgArchiveTarBall();
1377
            CreateDpkgArchiveTarBall();
1371
        }
1378
        }
1372
        else
1379
        else
1373
        {
1380
        {
1374
            Information("Creating dpkg_archive package:", $DPKG_DIR);
1381
            LogFileOp("Creating dpkg_archive package:", $DPKG_DIR);
1375
            CreateDpkgArchive();
1382
            CreateDpkgArchive();
1376
        }
1383
        }
1377
    }
1384
    }
1378
    else
1385
    else
1379
    {
1386
    {