summaryrefslogtreecommitdiff
path: root/build/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'build/files.c')
-rw-r--r--build/files.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/build/files.c b/build/files.c
index 3ba33f674..01ef6448c 100644
--- a/build/files.c
+++ b/build/files.c
@@ -685,10 +685,20 @@ static int parseForSimple(Spec spec, Package pkg, char *buf,
fl->processingFailed = 1;
res = 1;
} else {
- /* XXX FIXME: this is easy to do as macro expansion */
/* XXX WATCHOUT: buf is an arg */
- strcpy(buf, "%{_docdir}/%{name}-%{version}");
- expandMacros(spec, spec->macros, buf, BUFSIZ);
+ { const char *ddir, *name, *version;
+
+ headerGetEntry(pkg->header, RPMTAG_NAME, NULL,
+ (void *) &name, NULL);
+ headerGetEntry(pkg->header, RPMTAG_VERSION, NULL,
+ (void *) &version, NULL);
+
+ ddir = rpmGetPath("%{_docdir}/", name, "-", version, NULL);
+ strcpy(buf, ddir);
+ xfree(ddir);
+ }
+
+ /* XXX FIXME: this is easy to do as macro expansion */
if (! fl->passedSpecialDoc) {
pkg->specialDoc = newStringBuf();