Changeset 38


Ignore:
Timestamp:
Aug 9, 2007, 4:13:27 PM (12 years ago)
Author:
bruno
Message:

/etc/pb/proj now contains the strict minimum
rest is under pbconf/proj.pb

Location:
devel
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/Makefile.PL

    r37 r38  
    77    NAME         => 'pb',
    88    DISTNAME     => 'project-builder',
    9     VERSION      => PBVER
     9    VERSION      => PBVER,
    1010    PREREQ_PM    => {
    1111            #HTTP::Headers                    => 1.59,
    1212            #Template                         => 0,
    1313    },    # e.g., Module::Name => 1.1
    14     ABSTRACT_FROM => 'lib/pb.pm',   # retrieve abstract from module
     14    ABSTRACT_FROM => 'bin/pb.pl',   # retrieve abstract from module
    1515    AUTHOR        => 'Bruno Cornec <bruno#project-builder.org>',
    1616    EXE_FILES     => [ qw( pb.pl ) ],
  • devel/pb/bin/pb.pl

    r31 r38  
    2121
    2222use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles $debug $LOG);
    23 %extpkgdir = ();
    24 %filteredfiles = ();
    2523$debug = 0;                 # Debug level
    2624$LOG = *STDOUT;             # Where to log
  • devel/pb/lib/common.pm

    r30 r38  
    3434# Use project configuration file
    3535#
    36 pb_init("$ENV{'PBETC'}/$proj.pb");
     36my $pbroot=pb_init("$ENV{'PBETC'}/$proj");
     37
     38if (not defined $pbroot) {
     39    die "pbroot doesn't exist in $ENV{'PBETC'}/$proj";
     40} else {
     41    $ENV{'PBROOT'} = $pbroot;
     42}
     43
     44pb_conf_init("$ENV{'PBROOT'}/pbconf/$proj.pb");
    3745
    3846#
    3947# Check content
    4048#
    41 if (not defined $confparam{"pbroot"}) {
    42     die "confparam pbroot doesn't exist in $ENV{'PBETC'}/$proj.pb";
    43 } else {
    44     $ENV{'PBROOT'} = $confparam{"pbroot"};
    45 }
    4649if (defined $confparam{"cvsroot"}) {
    4750    $ENV{'CVSROOT'} = $confparam{"cvsroot"};
  • devel/pb/lib/pb.pm

    r22 r38  
    1111
    1212sub pb_init {
     13
     14my $conffile = shift;
     15my $trace;
     16
     17if ($debug > 0) {
     18    $trace = 1;
     19} else {
     20    $trace = 0;
     21}
     22
     23
     24my $config = AppConfig->new({
     25                            # Auto Create variables mentioned in Conf file
     26                            CREATE => 1,
     27                            DEBUG => $trace,
     28                            GLOBAL => {
     29                                # Each conf item is a hash
     30                                DEFAULT => { },
     31                                ARGCOUNT => AppConfig::ARGCOUNT_ONE,
     32                            }
     33                        });
     34$config->file($conffile);
     35my $ptr = $config->get("pbroot") || die "Unable to find pbroot in $conffile";
     36return($ptr);
     37}
     38
     39sub pb_conf_init {
    1340
    1441my $conffile = shift;
     
    5077# List of additional pkg to build when all is called (optional)
    5178$ptr = $config->get("extpkgdir");
    52 print "DEBUG: extpkgdir1: ".Dumper($ptr)."\n" if ($debug >= 1);
    5379if (not defined $ptr) {
    5480    %extpkgdir = ();
  • devel/pbconf/pb.pb

    r34 r38  
    77
    88# confparam is a hash to ease interface
    9 # Root directory of the pb project
    10 confparam pbroot = "/users/bruno/pb/svn/devel"
    119
    1210# Packager for ChangeLogs
     
    2927# List of files on which to apply filters
    3028# Files are mentioned relatively to pbroot
    31 filteredfiles pb/Makefile.PL
     29filteredfiles "pb/Makefile.PL"
Note: See TracChangeset for help on using the changeset viewer.