build/rpmspec.h

Go to the documentation of this file.
00001 #ifndef _H_SPEC_
00002 #define _H_SPEC_
00003 
00011 typedef struct Package_s * Package;
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 Spec_s {
00093 /*@only@*/
00094     const char * specFile;      
00095 /*@only@*/
00096     const char * buildRootURL;
00097 /*@only@*/
00098     const char * buildSubdir;
00099 /*@only@*/
00100     const char * rootURL;
00101 
00102 /*@owned@*/ /*@null@*/
00103     speclines sl;
00104 /*@owned@*/ /*@null@*/
00105     spectags st;
00106 
00107 /*@owned@*/
00108     struct OpenFileInfo * fileStack;
00109     char lbuf[10*BUFSIZ];
00110 /*@dependent@*/
00111     char *lbufPtr;
00112     char nextpeekc;
00113 /*@dependent@*/
00114     char * nextline;
00115 /*@dependent@*/
00116     char * line;
00117     int lineNum;
00118 
00119 /*@owned@*/
00120     struct ReadLevelEntry * readStack;
00121 
00122 /*@refcounted@*/
00123     Header buildRestrictions;
00124 /*@owned@*/ /*@null@*/
00125     Spec * BASpecs;
00126 /*@only@*/ /*@null@*/
00127     const char ** BANames;
00128     int BACount;
00129     int recursing;              
00131     int force;
00132     int anyarch;
00133 
00134     int gotBuildRootURL;
00135 
00136 /*@null@*/
00137     char * passPhrase;
00138     int timeCheck;
00139 /*@null@*/
00140     const char * cookie;
00141 
00142 /*@owned@*/
00143     struct Source * sources;
00144     int numSources;
00145     int noSource;
00146 
00147 /*@only@*/
00148     const char * sourceRpmName;
00149 /*@only@*/
00150     unsigned char * sourcePkgId;
00151 /*@refcounted@*/
00152     Header sourceHeader;
00153 /*@refcounted@*/
00154     rpmfi sourceCpioList;
00155 
00156 /*@dependent@*/ /*@null@*/
00157     MacroContext macros;
00158 
00159 /*@only@*/
00160     StringBuf prep;             
00161 /*@only@*/
00162     StringBuf build;            
00163 /*@only@*/
00164     StringBuf install;          
00165 /*@only@*/
00166     StringBuf check;            
00167 /*@only@*/
00168     StringBuf clean;            
00170 /*@owned@*/
00171     Package packages;           
00172 };
00173 
00177 struct Package_s {
00178 /*@refcounted@*/
00179     Header header;
00180 /*@refcounted@*/
00181     rpmds ds;                   
00182 /*@refcounted@*/
00183     rpmfi cpioList;
00184 
00185 /*@owned@*/
00186     struct Source * icon;
00187 
00188     int autoReq;
00189     int autoProv;
00190 
00191 /*@only@*/
00192     const char * preInFile;     
00193 /*@only@*/
00194     const char * postInFile;    
00195 /*@only@*/
00196     const char * preUnFile;     
00197 /*@only@*/
00198     const char * postUnFile;    
00199 /*@only@*/
00200     const char * preTransFile;  
00201 /*@only@*/
00202     const char * postTransFile; 
00203 /*@only@*/
00204     const char * verifyFile;    
00206 /*@only@*/
00207     StringBuf specialDoc;
00208 
00209 /*@only@*/
00210     struct TriggerFileEntry * triggerFiles;
00211 
00212 /*@only@*/
00213     const char * fileFile;
00214 /*@only@*/
00215     StringBuf fileList;         /* If NULL, package will not be written */
00216 
00217 /*@dependent@*/
00218     Package next;
00219 };
00220 
00221 #ifdef __cplusplus
00222 extern "C" {
00223 #endif
00224 
00229 /*@only@*/ Spec newSpec(void)
00230         /*@globals rpmGlobalMacroContext @*/
00231         /*@modifies rpmGlobalMacroContext @*/;
00232 
00238 /*@null@*/ Spec freeSpec(/*@only@*/ /*@null@*/ Spec spec)
00239         /*@globals fileSystem, internalState @*/
00240         /*@modifies spec, fileSystem, internalState @*/;
00241 
00249 int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
00250         /*@globals rpmGlobalMacroContext, h_errno,
00251                 fileSystem, internalState @*/
00252         /*@modifies ts, qva, rpmGlobalMacroContext,
00253                 fileSystem, internalState @*/;
00254 
00257 struct OpenFileInfo * newOpenFileInfo(void)
00258         /*@*/;
00259 
00266 spectag stashSt(Spec spec, Header h, int tag, const char * lang)
00267         /*@modifies spec->st @*/;
00268 
00275 int addSource(Spec spec, Package pkg, const char * field, int tag)
00276         /*@globals rpmGlobalMacroContext, h_errno @*/
00277         /*@modifies spec->sources, spec->numSources,
00278                 spec->st, spec->macros,
00279                 pkg->icon,
00280                 rpmGlobalMacroContext @*/;
00281 
00287 int parseNoSource(Spec spec, const char * field, int tag)
00288         /*@modifies nothing @*/;
00289 
00290 #ifdef __cplusplus
00291 }
00292 #endif
00293 
00294 #endif /* _H_SPEC_ */

Generated on Fri Oct 12 08:44:53 2007 for rpm by  doxygen 1.5.2