Subversion Repositories DevTools

Rev

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

Rev 7268 Rev 7398
Line 135... Line 135...
135
my $opt_zipFile;
135
my $opt_zipFile;
136
my $opt_zipOnly;
136
my $opt_zipOnly;
137
my $opt_rpm = 0;
137
my $opt_rpm = 0;
138
my $opt_debian = 0;
138
my $opt_debian = 0;
139
my $opt_output;
139
my $opt_output;
-
 
140
my $opt_imageOnly;
-
 
141
my $opt_directPkg;
140
 
142
 
141
#
143
#
142
#   Options marked as 'our' so that they are visible within the users script
144
#   Options marked as 'our' so that they are visible within the users script
143
#   Don't give the user too much
145
#   Don't give the user too much
144
#
146
#
Line 235... Line 237...
235
                'genRpm'            => \$opt_rpm,
237
                'genRpm'            => \$opt_rpm,
236
                'genDeb'            => \$opt_debian,
238
                'genDeb'            => \$opt_debian,
237
                'output=s'          => \$opt_output,
239
                'output=s'          => \$opt_output,
238
                'script=s'          => \$opt_package_script,
240
                'script=s'          => \$opt_package_script,
239
                'rpmRelease=s'      => \$opt_rpmRelease,
241
                'rpmRelease=s'      => \$opt_rpmRelease,
-
 
242
                'imageOnly'         => \$opt_imageOnly,
-
 
243
                'directPkg'         => \$opt_directPkg,
240
    );
244
    );
241
    $opt_verbose++ unless ( $opt_vargs eq '@' );
245
    $opt_verbose++ unless ( $opt_vargs eq '@' );
242
 
246
 
243
    ErrorConfig( 'name'    => 'PackagerUtils',
247
    ErrorConfig( 'name'    => 'PackagerUtils',
244
                 'verbose' => $opt_verbose,
248
                 'verbose' => $opt_verbose,
Line 273... Line 277...
273
    #
277
    #
274
    $WorkDirBase = uc("$opt_platform$opt_type.image");
278
    $WorkDirBase = uc("$opt_platform$opt_type.image");
275
    $WorkDirInit = "$WorkDirBase/$opt_name";
279
    $WorkDirInit = "$WorkDirBase/$opt_name";
276
    $WorkDir = $WorkDirInit;
280
    $WorkDir = $WorkDirInit;
277
 
281
 
-
 
282
    if ($opt_directPkg) {
-
 
283
        #
-
 
284
        #   Package directly into the package being generated
-
 
285
        #   Place stuff into the 'pkg' subdirectory
-
 
286
        #       Ignore the name of the package
-
 
287
        #
-
 
288
        $WorkDirBase = $opt_pkgdir;
-
 
289
        $WorkDirInit = "$WorkDirBase/pkg";
-
 
290
        $WorkDir = $WorkDirInit;
-
 
291
    }
-
 
292
 
278
    #
293
    #
279
    #   Configure the System command to fail on any error
294
    #   Configure the System command to fail on any error
280
    #
295
    #
281
    SystemConfig ( ExitOnError => 1 );
296
    SystemConfig ( ExitOnError => 1 );
282
 
297
 
Line 288... Line 303...
288
    #
303
    #
289
    #   Determine build operations
304
    #   Determine build operations
290
    #   
305
    #   
291
    my $genDebian = $opt_debian;
306
    my $genDebian = $opt_debian;
292
    my $genRpm = $opt_rpm;
307
    my $genRpm = $opt_rpm;
293
    if ($opt_tarOnly || $opt_zipOnly) {
308
    if ($opt_tarOnly || $opt_zipOnly || $opt_imageOnly || $opt_directPkg) {
294
        $genDebian = $genRpm = 0; 
309
        $genDebian = $genRpm = 0; 
295
    }
310
    }
296
     
311
     
297
 
312
 
298
    #
313
    #
Line 301... Line 316...
301
    Message    ("= Building Installer ================================================");
316
    Message    ("= Building Installer ================================================");
302
    Message    ("        Format: Debian") if ($genDebian);
317
    Message    ("        Format: Debian") if ($genDebian);
303
    Message    ("        Format: RPM") if ($genRpm);
318
    Message    ("        Format: RPM") if ($genRpm);
304
    Message    ("        Format: TGZ") if ($opt_tarFile);
319
    Message    ("        Format: TGZ") if ($opt_tarFile);
305
    Message    ("        Format: ZIP") if ($opt_zipFile);
320
    Message    ("        Format: ZIP") if ($opt_zipFile);
-
 
321
    Message    ("        Format: Image") if ($opt_imageOnly);
-
 
322
    Message    ("        Format: Directly Packaged Image") if ($opt_directPkg);
306
    Message    ("          Name: $opt_name");
323
    Message    ("          Name: $opt_name");
307
    Message    ("       Package: $opt_buildname");
324
    Message    ("       Package: $opt_buildname");
308
    Message    ("       Variant: $opt_variant") if ($opt_variant);
325
    Message    ("       Variant: $opt_variant") if ($opt_variant);
309
    Message    ("       Version: $opt_version");
326
    Message    ("       Version: $opt_version");
310
    Message    ("  Building for: $opt_platform");
327
    Message    ("  Building for: $opt_platform");
Line 313... Line 330...
313
    Message    ("          Type: $opt_type");
330
    Message    ("          Type: $opt_type");
314
    Message    ("   RPM Release: $opt_rpmRelease") if ($opt_rpmRelease);
331
    Message    ("   RPM Release: $opt_rpmRelease") if ($opt_rpmRelease);
315
    Message    ("      Pkg Arch: $opt_pkgarch") if ($opt_pkgarch);
332
    Message    ("      Pkg Arch: $opt_pkgarch") if ($opt_pkgarch);
316
    Verbose    ("       Verbose: $opt_verbose");
333
    Verbose    ("       Verbose: $opt_verbose");
317
    Verbose    ("  InterfaceDir: $opt_interfacedir");
334
    Verbose    ("  InterfaceDir: $opt_interfacedir");
-
 
335
    Message    ("        Output: " . $WorkDirInit )          if ($opt_imageOnly);
-
 
336
    Message    ("        Output: DPKG/pkg" )                 if ($opt_directPkg);
318
    Message    ("        Output: " . StripDir($opt_output))  if ($genDebian || $genRpm);
337
    Message    ("        Output: " . StripDir($opt_output))  if ($genDebian || $genRpm);
319
    Message    ("        Output: " . StripDir($opt_tarFile)) if $opt_tarFile;
338
    Message    ("        Output: " . StripDir($opt_tarFile)) if $opt_tarFile;
320
    Message    ("        Output: " . StripDir($opt_zipFile)) if $opt_zipFile;
339
    Message    ("        Output: " . StripDir($opt_zipFile)) if $opt_zipFile;
321
    Message    ("======================================================================");
340
    Message    ("======================================================================");
322
 
341