summaryrefslogtreecommitdiff
path: root/build/spec.c
diff options
context:
space:
mode:
authorroot <devnull@localhost>1997-04-14 18:40:23 +0000
committerroot <devnull@localhost>1997-04-14 18:40:23 +0000
commitf28df5d5c1d82b998e941a6b7cd31c8f33e6be1b (patch)
treee89a094d2cf2c06ea1e601d5b59299d5f74f4677 /build/spec.c
parent23fbf53b074763766dc22a823ead8479bd9e3688 (diff)
downloadlibrpm-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.c5
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 {