summaryrefslogtreecommitdiff
path: root/build/spec.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-09-05 20:02:08 +0000
committerjbj <devnull@localhost>1998-09-05 20:02:08 +0000
commite8b7b65b28000640df90a72d920eca7daa3db0aa (patch)
tree8415783005234299add3369d0e0826657d854ea0 /build/spec.c
parentdd8f00921aa4ec5b45d0db8b3b55b8ea109f1fed (diff)
downloadrpm-e8b7b65b28000640df90a72d920eca7daa3db0aa.tar.gz
rpm-e8b7b65b28000640df90a72d920eca7daa3db0aa.tar.bz2
rpm-e8b7b65b28000640df90a72d920eca7daa3db0aa.zip
Start converting variables into macro expansions.
RPMVAR_SOURCEDIR -> %{_sourcedir} RPMVAR_BUILDDIR -> %{_builddir} CVS patchset: 2279 CVS date: 1998/09/05 20:02:08
Diffstat (limited to 'build/spec.c')
-rw-r--r--build/spec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/spec.c b/build/spec.c
index 64afbbf6d..27ebe3fe4 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -308,7 +308,10 @@ int addSource(Spec spec, Package pkg, char *field, int tag)
spec->numSources++;
if (tag != RPMTAG_ICON) {
- sprintf(body, "%s/%s", rpmGetVar(RPMVAR_SOURCEDIR), p->source);
+ strcpy(body, "%{_sourcedir}/");
+ expandMacros(spec, spec->macros, body, sizeof(body)); /* W2DO? */
+ strcat(body, p->source);
+
sprintf(buf, "%s%d",
(flag & RPMBUILD_ISPATCH) ? "PATCH" : "SOURCE", num);
addMacro(spec->macros, buf, NULL, body, RMIL_SPEC);