source: ProjectBuilder/devel/pb/lib/pb.pm@ 17

Last change on this file since 17 was 17, checked in by Bruno Cornec, 17 years ago

Still in dev. phase - lots of changes - near the end for cms2build

File size: 1.2 KB
Line 
1#!/usr/bin/perl -w
2#
3# Project Builder configuration file
4# For project pb ;-)
5#
6# $Id$
7#
8use strict;
9use Exporter();
10use vars qw(@ISA @EXPORT_OK);
11@ISA = qw(Exporter);
12# global vars are here
13@EXPORT_OK = qw(%defpkgdir %extpkgdir %version %param %filteredfiles &pb_init);
14use vars @EXPORT_OK;
15use AppConfig qw(ARGCOUNT_HASH);
16
17sub pb_init {
18
19my $conffile = shift;
20my $ptr;
21
22my $config = AppConfig->new({
23 # Auto Create variables mentioned in Conf file
24 CREATE => 1,
25 DEBUG => 0,
26 GLOBAL => {
27 # Each conf item is a hash
28 ARGCOUNT => AppConfig::ARGCOUNT_HASH
29 }
30 });
31$config->file($conffile);
32
33# Root of the project to build
34# needs at least 2 levels of dir as in the upper
35# other dirs will be created and used
36$ptr = $config->get("param");
37%param = %$ptr;
38
39# List of pkg to build by default
40$ptr = $config->get("defpkgdir") || die "Unable to find defpkgdir in $conffile";
41%defpkgdir = %$ptr;
42
43# List of additional pkg to build when all is called
44$ptr = $config->get("extpkgdir");
45%extpkgdir = %$ptr;
46
47# Valid version names
48$ptr = $config->get("version");
49%version = %$ptr;
50
51# List of files to filter
52$ptr = $config->get("filteredfiles");
53%filteredfiles = %$ptr;
54
55}
561;
Note: See TracBrowser for help on using the repository browser.