diff options
author | root <devnull@localhost> | 1997-04-14 18:40:23 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1997-04-14 18:40:23 +0000 |
commit | f28df5d5c1d82b998e941a6b7cd31c8f33e6be1b (patch) | |
tree | e89a094d2cf2c06ea1e601d5b59299d5f74f4677 /build/spec.c | |
parent | 23fbf53b074763766dc22a823ead8479bd9e3688 (diff) | |
download | librpm-tizen-f28df5d5c1d82b998e941a6b7cd31c8f33e6be1b.tar.gz librpm-tizen-f28df5d5c1d82b998e941a6b7cd31c8f33e6be1b.tar.bz2 librpm-tizen-f28df5d5c1d82b998e941a6b7cd31c8f33e6be1b.zip |
add SOURCEn and PATCHn prefdefined macros
CVS patchset: 1530
CVS date: 1997/04/14 18:40:23
Diffstat (limited to 'build/spec.c')
-rw-r--r-- | build/spec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build/spec.c b/build/spec.c index 923447a29..103e9adf0 100644 --- a/build/spec.c +++ b/build/spec.c @@ -74,6 +74,7 @@ static int addSource(Spec spec, char *line) char *s, *s1, c; char *file; unsigned long int x; + char name[1024], expansion[1024]; p = malloc(sizeof(struct sources)); p->next = spec->sources; @@ -137,6 +138,10 @@ static int addSource(Spec spec, char *line) p->source = p->fullSource; } + sprintf(expansion, "%s/%s", rpmGetVar(RPMVAR_SOURCEDIR), p->source); + sprintf(name, "%s%d", (p->ispatch) ? "PATCH" : "SOURCE", p->num); + addMacro(name, expansion); + if (p->ispatch) { rpmMessage(RPMMESS_DEBUG, "Patch(%d) = %s\n", p->num, p->fullSource); } else { |