Subversion Repositories DevTools

Rev

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

Rev 4101 Rev 4105
Line 151... Line 151...
151
{
151
{
152
    my $result = GetOptions (
152
    my $result = GetOptions (
153
                "verbose:s"         => \$opt_vargs,
153
                "verbose:s"         => \$opt_vargs,
154
                "clean"             => \$opt_clean,
154
                "clean"             => \$opt_clean,
155
                "Type=s"            => \$opt_type,
155
                "Type=s"            => \$opt_type,
156
                "BuildName=s"       => \$opt_buildname,
156
                "BuildName=s"       => \$opt_buildname,                     # Raw Jats Package Name (Do not use)
-
 
157
                "Name=s"            => \$opt_name,                          # Massaged Debian Package Name
157
                "BuildVersion=s"    => \$opt_buildversion,
158
                "BuildVersion=s"    => \$opt_buildversion,
158
                "Platform=s"        => \$opt_platform,
159
                "Platform=s"        => \$opt_platform,
159
                "Target=s"          => \$opt_target,
160
                "Target=s"          => \$opt_target,
160
                "Product=s"         => \$opt_product,
161
                "Product=s"         => \$opt_product,
161
                "DebianPackage=s"   => \$opt_package_script,
162
                "DebianPackage=s"   => \$opt_package_script,
Line 172... Line 173...
172
                "PackageLibDir=s"   => \$opt_pkglibdir,
173
                "PackageLibDir=s"   => \$opt_pkglibdir,
173
                "PackageBinDir=s"   => \$opt_pkgbindir,
174
                "PackageBinDir=s"   => \$opt_pkgbindir,
174
                "PackagePkgDir=s"   => \$opt_pkgpkgdir,
175
                "PackagePkgDir=s"   => \$opt_pkgpkgdir,
175
                "Output=s"          => \$opt_output,
176
                "Output=s"          => \$opt_output,
176
                "Variant:s"         => \$opt_variant,
177
                "Variant:s"         => \$opt_variant,
177
                "Name=s"            => \$opt_name,
-
 
178
                "PkgArch:s"         => \$opt_pkgarch,
178
                "PkgArch:s"         => \$opt_pkgarch,
179
    );
179
    );
180
 
180
 
181
    $opt_verbose++ unless ( $opt_vargs eq '@' );
181
    $opt_verbose++ unless ( $opt_vargs eq '@' );
182
 
182
 
Line 193... Line 193...
193
    #   Ensure that we have all required options
193
    #   Ensure that we have all required options
194
    #
194
    #
195
    Error ("Platform not set")                  unless ( $opt_platform );
195
    Error ("Platform not set")                  unless ( $opt_platform );
196
    Error ("Type not set")                      unless ( $opt_type );
196
    Error ("Type not set")                      unless ( $opt_type );
197
    Error ("BuildName not set")                 unless ( $opt_buildname );
197
    Error ("BuildName not set")                 unless ( $opt_buildname );
-
 
198
    Error ("Debian Package Name not set")       unless ( $opt_name );
198
    Error ("BuildVersion not set")              unless ( $opt_buildversion );
199
    Error ("BuildVersion not set")              unless ( $opt_buildversion );
199
    Error ("InterfaceDir not set")              unless ( $opt_interfacedir );
200
    Error ("InterfaceDir not set")              unless ( $opt_interfacedir );
200
    Error ("Target not set")                    unless ( $opt_target );
201
    Error ("Target not set")                    unless ( $opt_target );
201
    Error ("Product not set")                   unless ( $opt_product );
202
    Error ("Product not set")                   unless ( $opt_product );
202
    Error ("DebianPackage not set")             unless ( $opt_package_script );
203
    Error ("DebianPackage not set")             unless ( $opt_package_script );
203
    Error ("Ouput File not set")                unless ( $opt_output );
204
    Error ("Ouput File not set")                unless ( $opt_output );
204
    Error ("Build Name not set")                unless ( $opt_name );
-
 
205
 
-
 
206
    #
-
 
207
    #   Clean up the build name
-
 
208
    #   Match any work done in the MakeDebianPackage directive
-
 
209
    #
-
 
210
    $opt_buildname =~ s~_~-~g;
-
 
211
 
205
 
212
    #
206
    #
213
    #   Read in relevent config information
207
    #   Read in relevent config information
214
    #
208
    #
215
    ReadBuildConfig ($opt_interfacedir, $opt_platform, '--NoTest' );
209
    ReadBuildConfig ($opt_interfacedir, $opt_platform, '--NoTest' );
Line 368... Line 362...
368
    open (DF, '>', $dst) || Error ("UpdateControlFile: Cannot create:$dst");
362
    open (DF, '>', $dst) || Error ("UpdateControlFile: Cannot create:$dst");
369
    while ( <SF> )
363
    while ( <SF> )
370
    {
364
    {
371
        s~\s*$~~;
365
        s~\s*$~~;
372
        if ( m~^Package:~ ) {
366
        if ( m~^Package:~ ) {
373
            $_ = "Package: $opt_buildname";
367
            $_ = "Package: $opt_name";
374
 
368
 
375
        } elsif ( m~^Version:~ ) {
369
        } elsif ( m~^Version:~ ) {
376
            $_ = "Version: $opt_buildversion";
370
            $_ = "Version: $opt_buildversion";
377
 
371
 
378
        } elsif ( m~^Architecture:~ ) {
372
        } elsif ( m~^Architecture:~ ) {
Line 401... Line 395...
401
    my $dst = "$DebianWorkDir/DEBIAN/control";
395
    my $dst = "$DebianWorkDir/DEBIAN/control";
402
 
396
 
403
    Verbose ("CreateControlFile: $dst" );
397
    Verbose ("CreateControlFile: $dst" );
404
 
398
 
405
    open (DF, '>', $dst) || Error ("CreateControlFile: Cannot create:$dst");
399
    open (DF, '>', $dst) || Error ("CreateControlFile: Cannot create:$dst");
406
    print DF "Package: $opt_buildname\n";
400
    print DF "Package: $opt_name\n";
407
    print DF "Version: $opt_buildversion\n";
401
    print DF "Version: $opt_buildversion\n";
408
    print DF "Section: main\n";
402
    print DF "Section: main\n";
409
    print DF "Priority: standard\n";
403
    print DF "Priority: standard\n";
410
    print DF "Architecture: $opt_pkgarch\n";
404
    print DF "Architecture: $opt_pkgarch\n";
411
    print DF "Essential: No\n";
405
    print DF "Essential: No\n";