summaryrefslogtreecommitdiff
path: root/build/spec.c
diff options
context:
space:
mode:
authormarc <devnull@localhost>1997-09-30 20:23:20 +0000
committermarc <devnull@localhost>1997-09-30 20:23:20 +0000
commitd518d25eb911b0c9bffc1da95f3d753ea4041d05 (patch)
treea994f6c4f912108c6021b5f9641febdf400924f6 /build/spec.c
parentb7d6861f740b68720d276da802330bd95c6a1914 (diff)
downloadlibrpm-tizen-d518d25eb911b0c9bffc1da95f3d753ea4041d05.tar.gz
librpm-tizen-d518d25eb911b0c9bffc1da95f3d753ea4041d05.tar.bz2
librpm-tizen-d518d25eb911b0c9bffc1da95f3d753ea4041d05.zip
Sanity check
CVS patchset: 1835 CVS date: 1997/09/30 20:23:20
Diffstat (limited to 'build/spec.c')
-rw-r--r--build/spec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/build/spec.c b/build/spec.c
index c46c54a8f..6aacf8aa5 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -1151,6 +1151,7 @@ Spec parseSpecAux(FILE *f, char *specfile, char *buildRootOverride,
int gotRoot = 0;
int versionMacroSet = 0;
int releaseMacroSet = 0;
+ char *arch, *os;
struct PackageRec *cur_package = NULL;
Spec spec = (struct SpecRec *) malloc(sizeof(struct SpecRec));
@@ -1177,6 +1178,11 @@ Spec parseSpecAux(FILE *f, char *specfile, char *buildRootOverride,
sb = newStringBuf();
reset_spec(); /* Reset the parser */
+ rpmGetArchInfo(&arch, NULL);
+ rpmGetOsInfo(&os, NULL);
+ addMacro("buildarch", arch);
+ addMacro("buildos", os);
+
scriptProg[0] = '\0';
cur_part = PREAMBLE_PART;
while ((x = read_line(f, buf)) > 0) {