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
00024 char * fileName;
00025
00026 char * script;
00027
00028 char * prog;
00029
00030 struct TriggerFileEntry * next;
00031 };
00032
00033 #define RPMBUILD_DEFAULT_LANG "C"
00034
00037 struct Source {
00038
00039 const char * fullSource;
00040
00041 const char * source;
00042 int flags;
00043 rpmuint32_t num;
00044
00045 struct Source * next;
00046 };
00047
00050
00051 typedef struct ReadLevelEntry {
00052 int reading;
00053
00054 struct ReadLevelEntry * next;
00055 } RLE_t;
00056
00057
00060 typedef struct OpenFileInfo {
00061
00062 const char * fileName;
00063
00064 FD_t fd;
00065 int lineNum;
00066 char readBuf[BUFSIZ];
00067
00068 char * readPtr;
00069
00070 struct OpenFileInfo * next;
00071 } OFI_t;
00072
00075 typedef struct spectag_s {
00076 int t_tag;
00077 int t_startx;
00078 int t_nlines;
00079
00080 const char * t_lang;
00081
00082 const char * t_msgid;
00083 } * spectag;
00084
00087 typedef struct spectags_s {
00088
00089 spectag st_t;
00090 int st_nalloc;
00091 int st_ntags;
00092 } * spectags;
00093
00096 typedef struct speclines_s {
00097
00098 char **sl_lines;
00099 int sl_nalloc;
00100 int sl_nlines;
00101 } * speclines;
00102
00106 struct Spec_s {
00107
00108 const char * specFile;
00109
00110 const char * buildSubdir;
00111
00112 const char * rootURL;
00113
00114
00115 speclines sl;
00116
00117 spectags st;
00118
00119
00120 struct OpenFileInfo * fileStack;
00121
00122 char *lbuf;
00123 size_t lbuf_len;
00124
00125 char *lbufPtr;
00126 char nextpeekc;
00127
00128 char * nextline;
00129
00130 char * line;
00131 int lineNum;
00132
00133
00134 struct ReadLevelEntry * readStack;
00135
00136
00137 Spec * BASpecs;
00138
00139 const char ** BANames;
00140 int BACount;
00141 int recursing;
00142 int toplevel;
00143
00144 int force;
00145 int anyarch;
00146
00147
00148 char * passPhrase;
00149 int timeCheck;
00150
00151 const char * cookie;
00152
00153
00154 struct Source * sources;
00155 int numSources;
00156 int noSource;
00157
00158
00159 const char * sourceRpmName;
00160
00161 unsigned char * sourcePkgId;
00162
00163 Header sourceHeader;
00164
00165 rpmfi sourceCpioList;
00166 int sourceHdrInit;
00167
00168
00169 MacroContext macros;
00170
00171 rpmRC (*_parseRCPOT) (Spec spec, Package pkg, const char *field, rpmTag tagN,
00172 rpmuint32_t index, rpmsenseFlags tagflags);
00173
00174
00175 rpmiob prep;
00176
00177 rpmiob build;
00178
00179 rpmiob install;
00180
00181 rpmiob check;
00182
00183 rpmiob clean;
00185 size_t nfoo;
00186
00187 tagStore_t foo;
00188
00189
00190 Package packages;
00191 };
00192
00196 struct Package_s {
00197
00198 Header header;
00199
00200 rpmds ds;
00201
00202 rpmfi cpioList;
00203
00204 int autoReq;
00205 int autoProv;
00206 int noarch;
00207
00208
00209 const char * preInFile;
00210
00211 const char * postInFile;
00212
00213 const char * preUnFile;
00214
00215 const char * postUnFile;
00216
00217 const char * preTransFile;
00218
00219 const char * postTransFile;
00220
00221 const char * verifyFile;
00222
00223 const char * sanityCheckFile;
00225
00226 rpmiob specialDoc;
00227
00228
00229 struct TriggerFileEntry * triggerFiles;
00230
00231
00232 const char * fileFile;
00233
00234 rpmiob fileList;
00235
00236
00237 Package next;
00238 };
00239
00240 #ifdef __cplusplus
00241 extern "C" {
00242 #endif
00243
00248
00249 Spec newSpec(void)
00250
00251 ;
00252
00258
00259 Spec freeSpec( Spec spec)
00260
00261 ;
00262
00270 int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
00271
00272
00273
00274 ;
00275
00278 struct OpenFileInfo * newOpenFileInfo(void)
00279 ;
00280
00289 spectag stashSt(Spec spec, Header h, rpmTag tag, const char * lang)
00290
00291 ;
00292
00301 int addSource(Spec spec, Package pkg, const char * field, rpmTag tag)
00302
00303
00304
00305 ;
00306
00314 int parseNoSource(Spec spec, const char * field, rpmTag tag)
00315 ;
00316
00322 int SpecSourceCount(Spec spec)
00323 ;
00324
00331 SpecSource getSource(Spec spec, int num)
00332 ;
00333
00339
00340 const char * specSourceName(SpecSource source)
00341 ;
00342
00348
00349 const char * specFullSourceName(SpecSource source)
00350 ;
00351
00357 int specSourceNum(SpecSource source)
00358 ;
00359
00365 int specSourceFlags(SpecSource source)
00366 ;
00367
00373
00374 #if defined(RPM_VENDOR_OPENPKG)
00375 const char * getSourceDir(rpmfileAttrs attr, const char *filename)
00376 #else
00377 const char * getSourceDir(rpmfileAttrs attr)
00378 #endif
00379 ;
00380
00381 #ifdef __cplusplus
00382 }
00383 #endif
00384
00385 #endif