rpm: /srv/include/rpm/rpmspec.h Source File

rpm 4.20.1 The RPM Package Manager

Loading...
Searching...
No Matches
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
13extern "C" {
14#endif
15
18typedef struct Package_s * rpmSpecPkg;
19typedef struct Source * rpmSpecSrc;
20typedef struct rpmSpecIter_s * rpmSpecPkgIter;
21typedef struct rpmSpecIter_s * rpmSpecSrcIter;
22
23enum rpmSourceFlags_e {
24 RPMBUILD_ISSOURCE = (1 << 0),
25 RPMBUILD_ISPATCH = (1 << 1),
26 RPMBUILD_ISICON = (1 << 2),
27 RPMBUILD_ISNO = (1 << 3),
28};
29
30typedef rpmFlags rpmSourceFlags;
31
32#define RPMBUILD_DEFAULT_LANG "C"
33
34enum rpmSpecFlags_e {
35 RPMSPEC_NONE = 0,
36 RPMSPEC_ANYARCH = (1 << 0),
37 RPMSPEC_FORCE = (1 << 1),
38 RPMSPEC_NOLANG = (1 << 2),
39 RPMSPEC_NOUTF8 = (1 << 3),
40 RPMSPEC_NOFINALIZE = (1 << 4),
41};
42
43typedef rpmFlags rpmSpecFlags;
44
50rpmSpec rpmSpecFree(rpmSpec spec);
51
52/* Iterator for spec packages */
53rpmSpecPkgIter rpmSpecPkgIterInit(rpmSpec spec);
54rpmSpecPkg rpmSpecPkgIterNext(rpmSpecPkgIter iter);
55rpmSpecPkgIter rpmSpecPkgIterFree(rpmSpecPkgIter iter);
56
57/* Getters for spec package attributes */
58 Header rpmSpecPkgHeader(rpmSpecPkg pkg);
59
60/*
61 * Retrieve package specific parsed spec script section (RPMBUILD_FILE_LIST,
62 * RPMBUILD_FILE_FILE, RPMBUILD_POLICY) as a malloc'ed string.
63 */
64char * rpmSpecPkgGetSection(rpmSpecPkg pkg, int section);
65
66
67/* Iterator for spec sources */
68rpmSpecSrcIter rpmSpecSrcIterInit(rpmSpec spec);
69rpmSpecSrc rpmSpecSrcIterNext(rpmSpecSrcIter iter);
70rpmSpecSrcIter rpmSpecSrcIterFree(rpmSpecSrcIter iter);
71
72/* Getters for spec source attributes */
73rpmSourceFlags rpmSpecSrcFlags(rpmSpecSrc src);
74int rpmSpecSrcNum(rpmSpecSrc src);
75const char * rpmSpecSrcFilename(rpmSpecSrc src, int full);
76
77/*
78 * Retrieve parsed spec script section (RPMBUILD_PREP, RPMBUILD_BUILD etc).
79 * As a special case, RPMBUILD_NONE as section returns the entire spec in
80 * preprocessed (macros expanded etc) format.
81 */
82const char * rpmSpecGetSection(rpmSpec spec, int section);
83
91 int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg);
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* _H_SPEC_ */
rpmSpecFree
rpmSpec rpmSpecFree(rpmSpec spec)
rpmspecQuery
int rpmspecQuery(rpmts ts, QVA_t qva, const char *arg)
rpmts
struct rpmts_s * rpmts
Definition rpmtypes.h:63
Header
struct headerToken_s * Header
Definition rpmtypes.h:24
rpmcli.h
rpmstring.h
rpmQVKArguments_s
Definition rpmcli.h:165