rpm  4.18.0
rpmspec.h
Go to the documentation of this file.
1 #ifndef _H_SPEC_
2 #define _H_SPEC_
3 
9 #include <rpm/rpmstring.h> /* StringBuf */
10 #include <rpm/rpmcli.h> /* for QVA_t */
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
18 typedef struct Package_s * rpmSpecPkg;
19 typedef struct Source * rpmSpecSrc;
20 typedef struct rpmSpecIter_s * rpmSpecPkgIter;
21 typedef struct rpmSpecIter_s * rpmSpecSrcIter;
22 
24  RPMBUILD_ISSOURCE = (1 << 0),
25  RPMBUILD_ISPATCH = (1 << 1),
26  RPMBUILD_ISICON = (1 << 2),
27  RPMBUILD_ISNO = (1 << 3),
28 };
29 
31 
32 #define RPMBUILD_DEFAULT_LANG "C"
33 
36  RPMSPEC_ANYARCH = (1 << 0),
37  RPMSPEC_FORCE = (1 << 1),
38  RPMSPEC_NOLANG = (1 << 2),
39  RPMSPEC_NOUTF8 = (1 << 3),
40 };
41 
43 
50 
51 /* Iterator for spec packages */
55 
56 /* Getters for spec package attributes */
58 
59 /*
60  * Retrieve package specific parsed spec script section (RPMBUILD_FILE_LIST,
61  * RPMBUILD_FILE_FILE, RPMBUILD_POLICY) as a malloc'ed string.
62  */
63 char * rpmSpecPkgGetSection(rpmSpecPkg pkg, int section);
64 
65 
66 /* Iterator for spec sources */
70 
71 /* Getters for spec source attributes */
74 const char * rpmSpecSrcFilename(rpmSpecSrc src, int full);
75 
76 /*
77  * Retrieve parsed spec script section (RPMBUILD_PREP, RPMBUILD_BUILD etc).
78  * As a special case, RPMBUILD_NONE as section returns the entire spec in
79  * preprocessed (macros expanded etc) format.
80  */
81 const char * rpmSpecGetSection(rpmSpec spec, int section);
82 
90 int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg);
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* _H_SPEC_ */
rpmSpec rpmSpecFree(rpmSpec spec)
Destroy Spec structure.
int rpmspecQuery(rpmts ts, QVA_t qva, const char *arg)
Function to query spec file(s).
struct Package_s * rpmSpecPkg
Definition: rpmspec.h:18
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Definition: rpmtypes.h:63
uint32_t rpmFlags
Definition: rpmtypes.h:42
struct headerToken_s * Header
RPM header and data retrieval types.
Definition: rpmtypes.h:24
Parsing RPM command line arguments.
int rpmSpecSrcNum(rpmSpecSrc src)
Header rpmSpecPkgHeader(rpmSpecPkg pkg)
const char * rpmSpecSrcFilename(rpmSpecSrc src, int full)
struct Source * rpmSpecSrc
Definition: rpmspec.h:19
rpmSpecFlags_e
Definition: rpmspec.h:34
@ RPMSPEC_ANYARCH
Definition: rpmspec.h:36
@ RPMSPEC_NOLANG
Definition: rpmspec.h:38
@ RPMSPEC_NOUTF8
Definition: rpmspec.h:39
@ RPMSPEC_NONE
Definition: rpmspec.h:35
@ RPMSPEC_FORCE
Definition: rpmspec.h:37
rpmSpecPkgIter rpmSpecPkgIterFree(rpmSpecPkgIter iter)
rpmSourceFlags rpmSpecSrcFlags(rpmSpecSrc src)
rpmSpecSrc rpmSpecSrcIterNext(rpmSpecSrcIter iter)
rpmSourceFlags_e
Definition: rpmspec.h:23
@ RPMBUILD_ISSOURCE
Definition: rpmspec.h:24
@ RPMBUILD_ISNO
Definition: rpmspec.h:27
@ RPMBUILD_ISICON
Definition: rpmspec.h:26
@ RPMBUILD_ISPATCH
Definition: rpmspec.h:25
rpmSpecPkg rpmSpecPkgIterNext(rpmSpecPkgIter iter)
rpmFlags rpmSourceFlags
Definition: rpmspec.h:30
rpmSpecSrcIter rpmSpecSrcIterFree(rpmSpecSrcIter iter)
struct rpmSpecIter_s * rpmSpecSrcIter
Definition: rpmspec.h:21
const char * rpmSpecGetSection(rpmSpec spec, int section)
struct rpmSpecIter_s * rpmSpecPkgIter
Definition: rpmspec.h:20
rpmSpecSrcIter rpmSpecSrcIterInit(rpmSpec spec)
rpmSpecPkgIter rpmSpecPkgIterInit(rpmSpec spec)
rpmFlags rpmSpecFlags
Definition: rpmspec.h:42
char * rpmSpecPkgGetSection(rpmSpecPkg pkg, int section)
String manipulation helper functions.
struct rpmSpec_s * rpmSpec
Definition: rpmtypes.h:91
Describe query/verify/signature command line operation.
Definition: rpmcli.h:165