build/rpmspec.h

Go to the documentation of this file.
00001 #ifndef _H_SPEC_
00002 #define _H_SPEC_
00003 
00011 typedef struct SpecStruct *Spec;
00012 
00015 struct TriggerFileEntry {
00016     int index;
00017 /*@only@*/ char * fileName;
00018 /*@only@*/ char * script;
00019 /*@only@*/ char * prog;
00020 /*@owned@*/ struct TriggerFileEntry * next;
00021 };
00022 
00023 #define RPMBUILD_ISSOURCE       (1 << 0)
00024 #define RPMBUILD_ISPATCH        (1 << 1)
00025 #define RPMBUILD_ISICON         (1 << 2)
00026 #define RPMBUILD_ISNO           (1 << 3)
00027 
00028 #define RPMBUILD_DEFAULT_LANG "C"
00029 
00032 struct Source {
00033 /*@owned@*/ char * fullSource;
00034 /*@dependent@*/ char * source;     /* Pointer into fullSource */
00035     int flags;
00036     int num;
00037 /*@owned@*/ struct Source * next;
00038 };
00039 
00042 /*@-typeuse@*/
00043 typedef struct ReadLevelEntry {
00044     int reading;
00045 /*@dependent@*/
00046     struct ReadLevelEntry * next;
00047 } RLE_t;
00048 /*@=typeuse@*/
00049 
00052 typedef struct OpenFileInfo {
00053 /*@only@*/ const char * fileName;
00054     FD_t fd;
00055     int lineNum;
00056     char readBuf[BUFSIZ];
00057 /*@dependent@*/
00058     char * readPtr;
00059 /*@owned@*/
00060     struct OpenFileInfo * next;
00061 } OFI_t;
00062 
00065 typedef struct spectag_s {
00066     int t_tag;
00067     int t_startx;
00068     int t_nlines;
00069 /*@only@*/ const char * t_lang;
00070 /*@only@*/ const char * t_msgid;
00071 } * spectag;
00072 
00075 typedef struct spectags_s {
00076 /*@owned@*/ spectag st_t;
00077     int st_nalloc;
00078     int st_ntags;
00079 } * spectags;
00080 
00083 typedef struct speclines_s {
00084 /*@only@*/ char **sl_lines;
00085     int sl_nalloc;
00086     int sl_nlines;
00087 } * speclines;
00088 
00092 struct SpecStruct {
00093 /*@only@*/ const char * specFile;       
00094 /*@only@*/ const char * sourceRpmName;
00095 /*@only@*/ const char * buildRootURL;
00096 /*@only@*/ const char * buildSubdir;
00097 /*@only@*/ const char * rootURL;
00098 
00099 /*@owned@*/ /*@null@*/ speclines sl;
00100 /*@owned@*/ /*@null@*/ spectags st;
00101 
00102 /*@owned@*/ struct OpenFileInfo * fileStack;
00103     char lbuf[4*BUFSIZ];
00104     char nextpeekc;
00105 /*@dependent@*/ char * nextline;
00106 /*@dependent@*/ char * line;
00107     int lineNum;
00108 
00109 /*@owned@*/ struct ReadLevelEntry * readStack;
00110 
00111 /*@refcounted@*/ Header buildRestrictions;
00112 /*@owned@*/ /*@null@*/ struct SpecStruct ** BASpecs;
00113 /*@only@*/ /*@null@*/ const char ** BANames;
00114     int BACount;
00115     int recursing;                      
00117     int force;
00118     int anyarch;
00119 
00120     int gotBuildRootURL;
00121 
00122 /*@null@*/ char * passPhrase;
00123     int timeCheck;
00124 /*@null@*/ const char * cookie;
00125 
00126 /*@owned@*/ struct Source * sources;
00127     int numSources;
00128     int noSource;
00129 
00130 /*@refcounted@*/
00131     Header sourceHeader;
00132 /*@owned@*/
00133     void * sourceCpioList;
00134 
00135 /*@dependent@*/ /*@null@*/ MacroContext macros;
00136 
00137 /*@only@*/ StringBuf prep;              
00138 /*@only@*/ StringBuf build;             
00139 /*@only@*/ StringBuf install;           
00140 /*@only@*/ StringBuf clean;             
00142 /*@owned@*/ struct PackageStruct * packages;    
00143 };
00144 
00148 struct PackageStruct {
00149 /*@refcounted@*/
00150     Header header;
00151 
00152 /*@owned@*/
00153     void * cpioList;
00154 
00155 /*@owned@*/ struct Source * icon;
00156 
00157     int autoReq;
00158     int autoProv;
00159 
00160 /*@only@*/ const char * preInFile;      
00161 /*@only@*/ const char * postInFile;     
00162 /*@only@*/ const char * preUnFile;      
00163 /*@only@*/ const char * postUnFile;     
00164 /*@only@*/ const char * verifyFile;     
00166 /*@only@*/ StringBuf specialDoc;
00167 
00168 /*@only@*/ struct TriggerFileEntry * triggerFiles;
00169 
00170 /*@only@*/ const char * fileFile;
00171 /*@only@*/ StringBuf fileList; /* If NULL, package will not be written */
00172 
00173 /*@dependent@*/ struct PackageStruct * next;
00174 };
00175 
00178 typedef struct PackageStruct * Package;
00179 
00180 #ifdef __cplusplus
00181 extern "C" {
00182 #endif
00183 
00188 /*@only@*/ Spec newSpec(void)
00189         /*@globals rpmGlobalMacroContext @*/
00190         /*@modifies rpmGlobalMacroContext @*/;
00191 
00197 /*@null@*/ Spec freeSpec(/*@only@*/ /*@null@*/ Spec spec)
00198         /*@globals fileSystem @*/
00199         /*@modifies spec, fileSystem @*/;
00200 
00205 /*@-declundef@*/
00206 extern /*@null@*/ Spec (*freeSpecVec) (Spec spec)       /* XXX FIXME */
00207         /*@globals fileSystem @*/
00208         /*@modifies spec, fileSystem @*/;
00209 /*@=declundef@*/
00210 
00213 struct OpenFileInfo * newOpenFileInfo(void)     /*@*/;
00214 
00218 spectag stashSt(Spec spec, Header h, int tag, const char * lang)
00219         /*@modifies spec->st @*/;
00220 
00224 int addSource(Spec spec, Package pkg, const char * field, int tag)
00225         /*@globals rpmGlobalMacroContext @*/
00226         /*@modifies spec->sources, spec->numSources,
00227                 spec->st, spec->macros,
00228                 pkg->icon,
00229                 rpmGlobalMacroContext @*/;
00230 
00234 int parseNoSource(Spec spec, const char * field, int tag)
00235         /*@modifies nothing @*/;
00236 
00237 #ifdef __cplusplus
00238 }
00239 #endif
00240 
00241 #endif /* _H_SPEC_ */

Generated on Wed Oct 25 12:57:43 2006 for rpm by  doxygen 1.4.7