• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

build/rpmspec.h

Go to the documentation of this file.
00001 #ifndef _H_RPMSPEC_
00002 #define _H_RPMSPEC_
00003 
00009 #include <rpmevr.h>
00010 
00013 typedef struct Package_s * Package;
00014 
00017 typedef struct Source * SpecSource;
00018 
00021 struct TriggerFileEntry {
00022     int index;
00023 /*@only@*/
00024     char * fileName;
00025 /*@only@*/
00026     char * script;
00027 /*@only@*/
00028     char * prog;
00029 /*@owned@*/
00030     struct TriggerFileEntry * next;
00031 };
00032 
00033 #define RPMBUILD_DEFAULT_LANG "C"
00034 
00037 struct Source {
00038 /*@owned@*/
00039     const char * fullSource;
00040 /*@dependent@*/
00041     const char * source;        /* Pointer into fullSource */
00042     int flags;
00043     uint32_t num;
00044 /*@owned@*/
00045     struct Source * next;
00046 };
00047 
00050 /*@-typeuse@*/
00051 typedef struct ReadLevelEntry {
00052     int reading;
00053 /*@dependent@*/
00054     struct ReadLevelEntry * next;
00055 } RLE_t;
00056 /*@=typeuse@*/
00057 
00060 typedef struct OpenFileInfo {
00061 /*@only@*/
00062     const char * fileName;
00063     FD_t fd;
00064     int lineNum;
00065     char readBuf[BUFSIZ];
00066 /*@dependent@*/
00067     char * readPtr;
00068 /*@owned@*/
00069     struct OpenFileInfo * next;
00070 } OFI_t;
00071 
00074 typedef struct spectag_s {
00075     int t_tag;
00076     int t_startx;
00077     int t_nlines;
00078 /*@only@*/
00079     const char * t_lang;
00080 /*@only@*/
00081     const char * t_msgid;
00082 } * spectag;
00083 
00086 typedef struct spectags_s {
00087 /*@owned@*/
00088     spectag st_t;
00089     int st_nalloc;
00090     int st_ntags;
00091 } * spectags;
00092 
00095 typedef struct speclines_s {
00096 /*@only@*/
00097     char **sl_lines;
00098     int sl_nalloc;
00099     int sl_nlines;
00100 } * speclines;
00101 
00105 struct Spec_s {
00106 /*@only@*/
00107     const char * specFile;      
00108 /*@only@*/
00109     const char * buildSubdir;
00110 /*@only@*/
00111     const char * rootURL;
00112 
00113 /*@owned@*/ /*@null@*/
00114     speclines sl;
00115 /*@owned@*/ /*@null@*/
00116     spectags st;
00117 
00118 /*@owned@*/
00119     struct OpenFileInfo * fileStack;
00120     char *lbuf;
00121     size_t lbuf_len;
00122 /*@dependent@*/
00123     char *lbufPtr;
00124     char nextpeekc;
00125 /*@dependent@*/
00126     char * nextline;
00127 /*@dependent@*/
00128     char * line;
00129     int lineNum;
00130 
00131 /*@owned@*/
00132     struct ReadLevelEntry * readStack;
00133 
00134 /*@owned@*/ /*@null@*/
00135     Spec * BASpecs;
00136 /*@only@*/ /*@null@*/
00137     const char ** BANames;
00138     int BACount;
00139     int recursing;              
00141     int force;
00142     int anyarch;
00143 
00144 /*@null@*/
00145     char * passPhrase;
00146     int timeCheck;
00147 /*@null@*/
00148     const char * cookie;
00149 
00150 /*@owned@*/
00151     struct Source * sources;
00152     int numSources;
00153     int noSource;
00154 
00155 /*@only@*/
00156     const char * sourceRpmName;
00157 /*@only@*/
00158     unsigned char * sourcePkgId;
00159 /*@refcounted@*/
00160     Header sourceHeader;
00161 /*@refcounted@*/
00162     rpmfi sourceCpioList;
00163     int sourceHdrInit;
00164 
00165 /*@dependent@*/ /*@null@*/
00166     MacroContext macros;
00167 
00168     rpmRC (*_parseRCPOT) (Spec spec, Package pkg, const char *field, rpmTag tagN,
00169                uint32_t index, rpmsenseFlags tagflags);
00170 
00171 /*@only@*/
00172     StringBuf prep;             
00173 /*@only@*/
00174     StringBuf build;            
00175 /*@only@*/
00176     StringBuf install;          
00177 /*@only@*/
00178     StringBuf check;            
00179 /*@only@*/
00180     StringBuf clean;            
00182     size_t nfoo;
00183 /*@only@*/ /*@null@*/
00184     tagStore_t foo;
00185 
00186 /*@owned@*/
00187     Package packages;           
00188 };
00189 
00193 struct Package_s {
00194 /*@refcounted@*/
00195     Header header;
00196 /*@refcounted@*/
00197     rpmds ds;                   
00198 /*@refcounted@*/
00199     rpmfi cpioList;
00200 
00201     int autoReq;
00202     int autoProv;
00203 
00204 /*@only@*/
00205     const char * preInFile;     
00206 /*@only@*/
00207     const char * postInFile;    
00208 /*@only@*/
00209     const char * preUnFile;     
00210 /*@only@*/
00211     const char * postUnFile;    
00212 /*@only@*/
00213     const char * preTransFile;  
00214 /*@only@*/
00215     const char * postTransFile; 
00216 /*@only@*/
00217     const char * verifyFile;    
00218 /*@only@*/
00219     const char * sanityCheckFile;
00221 /*@only@*/
00222     StringBuf specialDoc;
00223 
00224 /*@only@*/
00225     struct TriggerFileEntry * triggerFiles;
00226 
00227 /*@only@*/
00228     const char * fileFile;
00229 /*@only@*/
00230     StringBuf fileList;         /* If NULL, package will not be written */
00231 
00232 /*@dependent@*/
00233     Package next;
00234 };
00235 
00236 #ifdef __cplusplus
00237 extern "C" {
00238 #endif
00239 
00244 /*@only@*/ Spec newSpec(void)
00245         /*@globals rpmGlobalMacroContext @*/
00246         /*@modifies rpmGlobalMacroContext @*/;
00247 
00253 /*@null@*/ Spec freeSpec(/*@only@*/ /*@null@*/ Spec spec)
00254         /*@globals fileSystem, internalState @*/
00255         /*@modifies spec, fileSystem, internalState @*/;
00256 
00264 int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
00265         /*@globals rpmCLIMacroContext,
00266                 rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00267         /*@modifies ts, qva, rpmCLIMacroContext, rpmGlobalMacroContext,
00268                 fileSystem, internalState @*/;
00269 
00272 struct OpenFileInfo * newOpenFileInfo(void)
00273         /*@*/;
00274 
00281 spectag stashSt(Spec spec, Header h, int tag, const char * lang)
00282         /*@modifies spec->st @*/;
00283 
00290 int addSource(Spec spec, Package pkg, const char * field, int tag)
00291         /*@globals rpmGlobalMacroContext, h_errno @*/
00292         /*@modifies spec->sources, spec->numSources,
00293                 spec->st, spec->macros,
00294                 rpmGlobalMacroContext @*/;
00295 
00301 int parseNoSource(Spec spec, const char * field, int tag)
00302         /*@*/;
00303 
00309 int SpecSourceCount(Spec spec)
00310         /*@*/;
00311 
00318 SpecSource getSource(Spec spec, int num)
00319         /*@*/;
00320 
00326 /*@exposed@*/
00327 const char * specSourceName(SpecSource source)
00328         /*@*/;
00329 
00335 /*@exposed@*/
00336 const char * specFullSourceName(SpecSource source)
00337         /*@*/;
00338 
00344 int specSourceNum(SpecSource source)
00345         /*@*/;
00346 
00352 int specSourceFlags(SpecSource source)
00353         /*@*/;
00354 
00360 /*@null@*/
00361 #if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
00362 const char * getSourceDir(rpmfileAttrs attr, const char *filename)
00363 #else
00364 const char * getSourceDir(rpmfileAttrs attr)
00365 #endif
00366         /*@*/;
00367 
00368 #ifdef __cplusplus
00369 }
00370 #endif
00371 
00372 #endif /* _H_SPEC_ */

Generated on Mon Nov 29 2010 05:18:42 for rpm by  doxygen 1.7.2