diff options
author | jbj <devnull@localhost> | 1998-07-30 22:09:42 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1998-07-30 22:09:42 +0000 |
commit | 5142bf78e626b861ec1af6be7d81d3bb5c0afe03 (patch) | |
tree | aa6b84c1fb3cf9f267637a719f4f3106e19a1d12 /build/rpmbuild.h | |
parent | ff2267faac75d20f0b8e8ebfda7f571403ad5ee5 (diff) | |
download | librpm-tizen-5142bf78e626b861ec1af6be7d81d3bb5c0afe03.tar.gz librpm-tizen-5142bf78e626b861ec1af6be7d81d3bb5c0afe03.tar.bz2 librpm-tizen-5142bf78e626b861ec1af6be7d81d3bb5c0afe03.zip |
Consolidated includes for librpmbuild API.
CVS patchset: 2213
CVS date: 1998/07/30 22:09:42
Diffstat (limited to 'build/rpmbuild.h')
-rw-r--r-- | build/rpmbuild.h | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/build/rpmbuild.h b/build/rpmbuild.h new file mode 100644 index 000000000..318252c61 --- /dev/null +++ b/build/rpmbuild.h @@ -0,0 +1,150 @@ +#ifndef _H_RPMBUILD_ +#define _H_RPMBUILD_ + +/* This is the *only* module users of librpmbuild should need to include */ +#include "rpmlib.h" + +/* and it shouldn't need these :-( */ +#include "stringbuf.h" +#include "messages.h" +#include "misc.h" + +/* but this will be needed */ +#include "spec.h" + +/* from build/build.h */ + +#define RPMBUILD_PREP (1 << 0) +#define RPMBUILD_BUILD (1 << 1) +#define RPMBUILD_INSTALL (1 << 2) +#define RPMBUILD_CLEAN (1 << 3) +#define RPMBUILD_FILECHECK (1 << 4) +#define RPMBUILD_PACKAGESOURCE (1 << 5) +#define RPMBUILD_PACKAGEBINARY (1 << 6) +#define RPMBUILD_RMSOURCE (1 << 7) +#define RPMBUILD_RMBUILD (1 << 8) +#define RPMBUILD_STRINGBUF (1 << 9) /* only for doScript() */ + +/* from build/misc.h */ + +#include <ctype.h> + +#define FREE(x) { if (x) free(x); x = NULL; } +#define SKIPSPACE(s) { while (*(s) && isspace(*(s))) (s)++; } +#define SKIPNONSPACE(s) { while (*(s) && !isspace(*(s))) (s)++; } +#define SKIPTONEWLINE(s) { while (*s && *s != '\n') s++; } + +#define PART_SUBNAME 0 +#define PART_NAME 1 + +/* from build/part.h */ + +#define PART_NONE 0 +#define PART_PREAMBLE 1 +#define PART_PREP 2 +#define PART_BUILD 3 +#define PART_INSTALL 4 +#define PART_CLEAN 5 +#define PART_FILES 6 +#define PART_PRE 7 +#define PART_POST 8 +#define PART_PREUN 9 +#define PART_POSTUN 10 +#define PART_DESCRIPTION 11 +#define PART_CHANGELOG 12 +#define PART_TRIGGERIN 13 +#define PART_TRIGGERUN 14 +#define PART_VERIFYSCRIPT 15 +#define PART_BUILDARCHITECTURES 16 +#define PART_TRIGGERPOSTUN 17 + +/* from build/read.h */ + +#define STRIP_NOTHING 0 +#define STRIP_TRAILINGSPACE (1 << 0) +#define STRIP_COMMENTS (1 << 1) + +#ifdef __cplusplus +extern "C" { +#endif + +int isCompressed(char *file, int *compressed); + +/* from build/names.h */ + +char *getUname(uid_t uid); +char *getUnameS(char *uname); +char *getGname(gid_t gid); +char *getGnameS(char *gname); + +char *buildHost(void); +time_t *getBuildTime(void); + +/* from build/read.h */ + +/* returns 0 - success */ +/* 1 - EOF */ +/* <0 - error */ +int readLine(Spec spec, int strip); + +void closeSpec(Spec spec); +void handleComments(char *s); + +/* from build/part.h */ + +int isPart(char *line); + +/* from build/misc.h */ + +int parseNum(char *line, int *res); +char *cleanFileName(char *name); + +/* from build/parse.h */ + +int parseChangelog(Spec spec); +int parseDescription(Spec spec); +int parseFiles(Spec spec); +int parsePreamble(Spec spec, int initialPackage); +int parsePrep(Spec spec); +int parseRequiresConflicts(Spec spec, Package pkg, char *field, + int tag, int index); +int parseProvidesObsoletes(Spec spec, Package pkg, char *field, int tag); +int parseTrigger(Spec spec, Package pkg, char *field, int tag); +int parseScript(Spec spec, int parsePart); +int parseBuildInstallClean(Spec spec, int parsePart); + +/* from build/build.h */ + +int doScript(Spec spec, int what, char *name, StringBuf sb, int test); + +/* from build/package.h */ + +int lookupPackage(Spec spec, char *name, int flag, Package *pkg); +Package newPackage(Spec spec); +void freePackages(Spec spec); +void freePackage(Package p); + +/* from build/reqprov.h */ + +int addReqProv(Spec spec, Package pkg, + int flag, char *name, char *version, int index); + +/* from build/files.h */ + +int processBinaryFiles(Spec spec, int installSpecialDoc, int test); +int processSourceFiles(Spec spec); + +/* global entry points */ + +int parseSpec(Spec *specp, char *specFile, char *buildRoot, + int inBuildArch, char *passPhrase, char *cookie); +int buildSpec(Spec spec, int what, int test); + +int packageBinaries(Spec spec); +int packageSources(Spec spec); + +#ifdef __cplusplus +} +#endif + +#endif /* _H_RPMBUILD_ */ |