SHA256
6
0
forked from pool/rpm
OBS User unknown
2008-09-12 18:37:28 +00:00
committed by Git OBS Bridge
parent 64a650bf09
commit 8c64a58df3
101 changed files with 1142 additions and 3196 deletions

View File

@@ -1,36 +0,0 @@
Add support for a new macro, %{_docdir}. It can be used to specify
the name of the directory for %doc files.
Default is "%{NAME}-%{VERSION}", SUSE uses just "%{NAME}".
rh#125514
--- ./build/files.c.orig 2005-12-14 19:22:43.000000000 +0000
+++ ./build/files.c 2006-02-17 13:57:25.000000000 +0000
@@ -1006,11 +1006,23 @@ static int parseForSimple(/*@unused@*/Sp
res = 1;
} else {
/* XXX WATCHOUT: buf is an arg */
- { const char *ddir, *n, *v;
-
- (void) headerNVR(pkg->header, &n, &v, NULL);
-
- ddir = rpmGetPath("%{_docdir}/", n, "-", v, NULL);
+ {
+ static char *_docdir_fmt= 0;
+ static int oneshot = 0;
+ const char *ddir, *fmt, *errstr;
+ if (!oneshot) {
+ _docdir_fmt = rpmExpand("%{?_docdir_fmt}", NULL);
+ if (!_docdir_fmt || !*_docdir_fmt)
+ _docdir_fmt = "%{NAME}-%{VERSION}";
+ oneshot = 1;
+ }
+ fmt = headerSprintf(pkg->header, _docdir_fmt, rpmTagTable, rpmHeaderFormats, &errstr);
+ if (!fmt) {
+ rpmError(RPMERR_BADSPEC, _("illegal _docdir_fmt: %s\n"), errstr);
+ fl->processingFailed = 1;
+ res = 1;
+ }
+ ddir = rpmGetPath("%{_docdir}/", fmt, NULL);
strcpy(buf, ddir);
ddir = _free(ddir);
}