rpm: rpmspec.h Source File

rpm 4.12.0.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

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
23 enum rpmSourceFlags_e {
24 RPMBUILD_ISSOURCE = (1 << 0),
25 RPMBUILD_ISPATCH = (1 << 1),
26 RPMBUILD_ISICON = (1 << 2),
27 RPMBUILD_ISNO = (1 << 3),
28 };
29
30 typedef rpmFlags rpmSourceFlags;
31
32 #define RPMBUILD_DEFAULT_LANG "C"
33
34 enum rpmSpecFlags_e {
35 RPMSPEC_NONE = 0,
36 RPMSPEC_ANYARCH = (1 << 0),
37 RPMSPEC_FORCE = (1 << 1),
38 RPMSPEC_NOLANG = (1 << 2),
39 };
40
41 typedef rpmFlags rpmSpecFlags;
42
48 rpmSpec rpmSpecFree(rpmSpec spec);
49
50 /* Iterator for spec packages */
51 rpmSpecPkgIter rpmSpecPkgIterInit(rpmSpec spec);
52 rpmSpecPkg rpmSpecPkgIterNext(rpmSpecPkgIter iter);
53 rpmSpecPkgIter rpmSpecPkgIterFree(rpmSpecPkgIter iter);
54
55 /* Getters for spec package attributes */
56 Header rpmSpecPkgHeader(rpmSpecPkg pkg);
57
58 /* Iterator for spec sources */
59 rpmSpecSrcIter rpmSpecSrcIterInit(rpmSpec spec);
60 rpmSpecSrc rpmSpecSrcIterNext(rpmSpecSrcIter iter);
61 rpmSpecSrcIter rpmSpecSrcIterFree(rpmSpecSrcIter iter);
62
63 /* Getters for spec source attributes */
64 rpmSourceFlags rpmSpecSrcFlags(rpmSpecSrc src);
65 int rpmSpecSrcNum(rpmSpecSrc src);
66 const char * rpmSpecSrcFilename(rpmSpecSrc src, int full);
67
68 /*
69 * Retrieve parsed spec script section (RPMBUILD_PREP, RPMBUILD_BUILD etc).
70 * As a special case, RPMBUILD_NONE as section returns the entire spec in
71 * preprocessed (macros expanded etc) format.
72 */
73 const char * rpmSpecGetSection(rpmSpec spec, int section);
74
82 int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg);
83
84 #ifdef __cplusplus
85 }
86 #endif
87
88 #endif /* _H_SPEC_ */
rpmSourceFlags
rpmFlags rpmSourceFlags
Definition: rpmspec.h:30
RPMBUILD_ISPATCH
Definition: rpmspec.h:25
rpmspecQuery
int rpmspecQuery(rpmts ts, QVA_t qva, const char *arg)
Function to query spec file(s).
RPMSPEC_FORCE
Definition: rpmspec.h:37
rpmSpecPkgIterNext
rpmSpecPkg rpmSpecPkgIterNext(rpmSpecPkgIter iter)
rpmSpecPkgHeader
Header rpmSpecPkgHeader(rpmSpecPkg pkg)
rpmSpecPkg
struct Package_s * rpmSpecPkg
Definition: rpmspec.h:18
rpmts
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Definition: rpmtypes.h:63
rpmQVKArguments_s
Describe query/verify/signature command line operation.
Definition: rpmcli.h:168
RPMBUILD_ISSOURCE
Definition: rpmspec.h:24
rpmSpecSrcIterInit
rpmSpecSrcIter rpmSpecSrcIterInit(rpmSpec spec)
rpmSpecFree
rpmSpec rpmSpecFree(rpmSpec spec)
Destroy Spec structure.
rpmFlags
uint32_t rpmFlags
Definition: rpmtypes.h:42
RPMSPEC_NONE
Definition: rpmspec.h:35
rpmSpecPkgIterInit
rpmSpecPkgIter rpmSpecPkgIterInit(rpmSpec spec)
rpmSpecSrcIter
struct rpmSpecIter_s * rpmSpecSrcIter
Definition: rpmspec.h:21
rpmSpecSrcFilename
const char * rpmSpecSrcFilename(rpmSpecSrc src, int full)
Header
struct headerToken_s * Header
RPM header and data retrieval types.
Definition: rpmtypes.h:24
rpmSourceFlags_e
rpmSourceFlags_e
Definition: rpmspec.h:23
rpmSpecSrcIterFree
rpmSpecSrcIter rpmSpecSrcIterFree(rpmSpecSrcIter iter)
RPMSPEC_ANYARCH
Definition: rpmspec.h:36
rpmSpecSrc
struct Source * rpmSpecSrc
Definition: rpmspec.h:19
rpmSpecSrcIterNext
rpmSpecSrc rpmSpecSrcIterNext(rpmSpecSrcIter iter)
rpmSpecGetSection
const char * rpmSpecGetSection(rpmSpec spec, int section)
RPMBUILD_ISNO
Definition: rpmspec.h:27
rpmSpecFlags
rpmFlags rpmSpecFlags
Definition: rpmspec.h:41
rpmSpecPkgIter
struct rpmSpecIter_s * rpmSpecPkgIter
Definition: rpmspec.h:20
RPMBUILD_ISICON
Definition: rpmspec.h:26
rpmSpecPkgIterFree
rpmSpecPkgIter rpmSpecPkgIterFree(rpmSpecPkgIter iter)
rpmSpecSrcFlags
rpmSourceFlags rpmSpecSrcFlags(rpmSpecSrc src)
RPMSPEC_NOLANG
Definition: rpmspec.h:38
rpmSpecSrcNum
int rpmSpecSrcNum(rpmSpecSrc src)
rpmSpecFlags_e
rpmSpecFlags_e
Definition: rpmspec.h:34
rpmSpec
struct rpmSpec_s * rpmSpec
Definition: rpmtypes.h:90