Subversion Repositories DevTools

Rev

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

Rev 407 Rev 409
Line 21... Line 21...
21
#                 Where Options may be one of:
21
#                 Where Options may be one of:
22
#                   --Script=DebianPackagerScript       - Mandatory. Name of a the debian script
22
#                   --Script=DebianPackagerScript       - Mandatory. Name of a the debian script
23
#
23
#
24
#......................................................................#
24
#......................................................................#
25
 
25
 
26
require 5.6.1;
26
require 5.006_001;
27
#use strict;
27
#use strict;
28
use warnings;
28
use warnings;
29
 
29
 
30
#-------------------------------------------------------------------------------
30
#-------------------------------------------------------------------------------
31
# Function        : MakeDebianPackage
31
# Function        : MakeDebianPackage
Line 79... Line 79...
79
    #   Debian has strict requirements than JATS
79
    #   Debian has strict requirements than JATS
80
    #       Name:    Lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.).
80
    #       Name:    Lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.).
81
    #                Release Manager does not allow '.'
81
    #                Release Manager does not allow '.'
82
    #       Version: alphanumerics and the characters . + - : (full stop, plus, hyphen, colon) and should start with a digit
82
    #       Version: alphanumerics and the characters . + - : (full stop, plus, hyphen, colon) and should start with a digit
83
    #
83
    #
84
    if ( $build_name =~ m/_/ )
84
    #   Allow ( and cleanup )
-
 
85
    #       ERGxxxxx    -> erg-xxx
-
 
86
    #       _           -> -
85
    {
87
    #
-
 
88
    my $cvt = 0;
-
 
89
    $cvt = 1 if ( $build_name =~ s/^ERG/erg-/ );
86
        $build_name =~ s~_~-~g;
90
    $cvt = 1 if ( $build_name =~ s~_~-~g );
-
 
91
    $cvt = 1 if ( $build_name =~ tr/-//s );
-
 
92
 
87
        Warning ("Package Name converted to debian friendly form: $build_name");
93
    Warning ("Package Name converted to debian friendly form: $build_name")
88
    }
94
        if ( $cvt );
89
 
95
 
90
    unless ( $build_name =~ m/^[a-z]{2}[-+a-z0-9]+$/ )
96
    unless ( $build_name =~ m/^[a-z]{2}[-+a-z0-9]+$/ )
91
    {
97
    {
92
        Error ("Package Name does not conform to Debian Requirements",
98
        Error ("Package Name does not conform to Debian Requirements",
93
               "Must start with two alphabetic characters",
99
               "Must start with two alphabetic characters",