rpm  4.9.1.3
rpmbuild.h
Go to the documentation of this file.
00001 #ifndef _H_RPMBUILD_
00002 #define _H_RPMBUILD_
00003 
00009 #include <rpm/rpmcli.h>
00010 #include <rpm/rpmds.h>
00011 #include <rpm/rpmspec.h>
00012 
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016 
00020 enum rpmBuildFlags_e {
00021     RPMBUILD_NONE       = 0,
00022     RPMBUILD_PREP       = (1 <<  0),    
00023     RPMBUILD_BUILD      = (1 <<  1),    
00024     RPMBUILD_INSTALL    = (1 <<  2),    
00025     RPMBUILD_CHECK      = (1 <<  3),    
00026     RPMBUILD_CLEAN      = (1 <<  4),    
00027     RPMBUILD_FILECHECK  = (1 <<  5),    
00028     RPMBUILD_PACKAGESOURCE = (1 <<  6), 
00029     RPMBUILD_PACKAGEBINARY = (1 <<  7), 
00030     RPMBUILD_RMSOURCE   = (1 <<  8),    
00031     RPMBUILD_RMBUILD    = (1 <<  9),    
00032     RPMBUILD_STRINGBUF  = (1 << 10),    
00033     RPMBUILD_RMSPEC     = (1 << 11),    
00035     RPMBUILD_NOBUILD    = (1 << 31)     
00036 };
00037 
00038 typedef rpmFlags rpmBuildFlags;
00039 
00043 enum rpmBuildPkgFlags_e {
00044     RPMBUILD_PKG_NONE           = 0,
00045     RPMBUILD_PKG_NODIRTOKENS    = (1 << 0), 
00046 };
00047 
00048 typedef rpmFlags rpmBuildPkgFlags;
00049 
00053 struct rpmBuildArguments_s {
00054     rpmBuildPkgFlags pkgFlags;  
00055     rpmBuildFlags buildAmount;  
00056     char * buildRootOverride;   
00057     char * cookie;              
00058     const char * rootdir;
00059 };
00060 
00063 typedef struct rpmBuildArguments_s *    BTA_t;
00064 
00074 rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags,
00075                      const char *buildRoot);
00076 
00082 Header rpmSpecSourceHeader(rpmSpec spec);
00083 
00090 rpmps rpmSpecCheckDeps(rpmts ts, rpmSpec spec);
00091 
00098 rpmds rpmSpecDS(rpmSpec spec, rpmTagVal tag);
00099 
00106 rpmRC rpmSpecBuild(rpmSpec spec, BTA_t buildArgs);
00107 
00108 #ifdef __cplusplus
00109 }
00110 #endif
00111 
00112 #endif  /* _H_RPMBUILD_ */