Changeset 3


Ignore:
Timestamp:
10/21/05 17:03:40 (19 years ago)
Author:
kdeugau
Message:

/trunk

Checkpoint 10/21/2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r2 r3  
    1111###
    1212
     13# Program flow:
     14# -> Parse/execute "system" config/macros (if any - should be rare)
     15# -> Parse/execute "user" config/macros (if any - *my* requirement is %_topdir)
     16# -> Parse command line for options, spec file/tarball/.src.deb (NB - also accept .src.rpm)
     17
    1318# User's prefs for dirs, environment, etc,etc,etc.
    1419# config file ~/.debmacros
     
    2126# default is /usr/src/debian/{BUILD,SOURCES,SPECS,DEBS,SDEBS}
    2227
     28# Globals
     29my $specfile;
     30my $tarball;
     31my $srcpkg;
     32my $verbosity = 0;
     33
     34parse_cmd();
     35
     36## parse_cmd()
     37# Parses command line into internal option (array|hash)
     38# Options based on rpmbuild's options
     39sub parse_cmd {
     40  # Don't feel like coding my own option parser...
     41  #use Getopt::Long;
     42  # ... but I may have to:  (OTOH, rpm uses popt, so maybe we can too.)
     43  #use Getopt::Popt qw(:all);
     44
     45  # Stuff it.
     46  foreach (@ARGV) {
     47    chomp;
     48    # Is it an option?
     49    if (/^-/) {
     50      # Is it a long option?
     51      if (/^--/) {
     52        print "Long opt $_\n";
     53      } else {
     54        print "Short opt $_\n";
     55      }
     56    } else {
     57      print "Non-option arg $_\n";
     58    }
     59  }
     60  # Valid options, with example arguments (if any):
     61# Build from .spec file; mutually exclusive:
     62  # -bp
     63  # -bc         
     64  # -bi         
     65  # -bl
     66  # -ba
     67  # -bb
     68  # -bs
     69# Build from tarball; mutually exclusive:
     70  # -tp
     71  # -tc
     72  # -ti
     73  # -ta
     74  # -tb
     75  # -ts
     76# Build from .src.(deb|rpm)
     77  # --rebuild
     78  # --recompile
     79
     80# General options
     81  # --buildroot=DIRECTORY
     82  # --clean
     83  # --nobuild
     84  # --nodeps
     85  # --nodirtokens
     86  # --rmsource
     87  # --rmspec
     88  # --short-circuit
     89  # --target=CPU-VENDOR-OS
     90
     91  #my $popt = new Getopt::Popt(argv => \@ARGV, options => \@optionsTable);
     92
     93} # end parse_cmd()
     94
     95## unpack()
     96# Unpacks the tarball from the SOURCES directory to the BUILD directory.
     97# Speaks gzip and bzip2.
     98# Requires the "package name"
    2399sub unpack(){}
     100
    24101sub patch(){}
    25102sub configure(){}
Note: See TracChangeset for help on using the changeset viewer.