home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / misc / src / rpm / build / specP.h < prev    next >
C/C++ Source or Header  |  1997-09-17  |  2KB  |  98 lines

  1. #ifndef _SPECP_H_
  2. #define _SPECP_H_
  3.  
  4. #include "spec.h"
  5. #include "header.h"
  6. #include "stringbuf.h"
  7.  
  8. typedef struct sources {
  9.     char *fullSource;
  10.     char *source;
  11.     int ispatch;
  12.     int num;
  13.     struct sources *next;
  14. } *Sources;
  15.  
  16. struct ReqProv {
  17.     int flags;
  18.     char *name;
  19.     char *version;
  20.     struct ReqProv *next;
  21. };
  22.  
  23. struct TriggerEntry {
  24.     int flags;
  25.     char *name;
  26.     char *version;
  27.     int index;
  28.     struct TriggerEntry *next;
  29. };
  30.  
  31. struct TriggerStruct {
  32.     char **triggerScripts;
  33.     int alloced;
  34.     int used;
  35.     int triggerCount;
  36.     struct TriggerEntry *trigger;
  37. };
  38.  
  39. struct SpecRec {
  40.     char *name;      /* package base name */
  41.     char *specfile;
  42.  
  43.     int numSources;
  44.     int numPatches;
  45.     Sources sources;
  46.  
  47.     int numNoSource;
  48.     int numNoPatch;
  49.     int_32 *noSource;
  50.     int_32 *noPatch;
  51.  
  52.     int autoReqProv;
  53.  
  54.     StringBuf prep;
  55.     StringBuf build;
  56.     StringBuf install;
  57.     StringBuf doc;
  58.     StringBuf clean;
  59.  
  60.     char *buildroot;
  61.     char *buildArch;
  62.     
  63.     struct PackageRec *packages;
  64.     /* The first package record is the "main" package and contains
  65.      * the bulk of the preamble information.  Subsequent package
  66.      * records "inherit" from the main record.  Note that the
  67.      * "main" package may be, in pre-rpm-2.0 terms, a "subpackage".
  68.      */
  69. };
  70.  
  71. struct PackageRec {
  72.     char *subname;   /* If both of these are NULL, then this is          */
  73.     char *newname;   /* the main package.  subname concats with name     */
  74.     Header header;
  75.     char *icon;
  76.     int files;       /* If -1, package has no files, and won't be written */
  77.     char *fileFile;
  78.     StringBuf filelist;
  79.     StringBuf doc;   /* Used to buffer up %doc lines until fully parsed */
  80.     int numReq;
  81.     int numPreReq;
  82.     int numProv;
  83.     int numConflict;
  84.     int numObsoletes;
  85.     struct ReqProv *reqprov;
  86.     struct PackageRec *next;
  87.     struct TriggerStruct trigger;
  88. };
  89.  
  90. struct ReqComp {
  91.     char *token;
  92.     int flags;
  93. };
  94.  
  95. extern struct ReqComp ReqComparisons[];
  96.  
  97. #endif _SPECP_H_
  98.