summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/parseSpec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 8eca50254..996c4d1ca 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -555,6 +555,13 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootDir,
}
}
+ if (spec->clean == NULL) {
+ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL);
+ spec->clean = newStringBuf();
+ appendLineStringBuf(spec->clean, body);
+ free(body);
+ }
+
/* Check for description in each package and add arch and os */
{
char *platform = rpmExpand("%{_target_platform}", NULL);