1.1 --- a/openpkg/rpm.patch.feature Tue Jul 31 10:03:54 2012 +0200 1.2 +++ b/openpkg/rpm.patch.feature Tue Jul 31 12:12:54 2012 +0200 1.3 @@ -58,7 +58,7 @@ 1.4 1.5 install-data-local: 1.6 - @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm 1.7 -+ @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/openpkg 1.8 ++ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg 1.9 @rm -f $(DESTDIR)$(libdir)/rpmrc 1.10 @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc 1.11 @rm -f $(DESTDIR)$(libdir)/rpmpopt 1.12 @@ -184,7 +184,7 @@ 1.13 1.14 install-data-local: 1.15 - @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm 1.16 -+ @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/openpkg 1.17 ++ @$(mkinstalldirs) $(DESTDIR)$(libdir)/openpkg 1.18 @rm -f $(DESTDIR)$(libdir)/rpmrc 1.19 @@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc 1.20 @rm -f $(DESTDIR)$(libdir)/rpmpopt 1.21 @@ -1934,6 +1934,8 @@ 1.22 | (package build-time feature for performing vendor source tracking) 1.23 | and %test (package install-time feature for performing package 1.24 | run-time tests). 1.25 +| 1.26 +| MSvB: Additionally provide a default %clean section, removing buildroot. 1.27 +--------------------------------------------------------------------------- 1.28 Index: build/parseSpec.c 1.29 --- build/parseSpec.c 15 May 2003 13:38:57 -0000 1.1.1.15 1.30 @@ -1965,6 +1967,20 @@ 1.31 case PART_NONE: /* XXX avoid gcc whining */ 1.32 case PART_LAST: 1.33 case PART_BUILDARCHITECTURES: 1.34 +@@ -576,6 +589,13 @@ 1.35 + } 1.36 + /*@=infloops@*/ /* LCL: parsePart is modified @*/ 1.37 + 1.38 ++ if (spec->clean == NULL) { 1.39 ++ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL); 1.40 ++ spec->clean = newStringBuf(); 1.41 ++ appendLineStringBuf(spec->clean, body); 1.42 ++ free(body); 1.43 ++ } 1.44 ++ 1.45 + /* Check for description in each package and add arch and os */ 1.46 + { 1.47 + #ifdef DYING 1.48 1.49 +--------------------------------------------------------------------------- 1.50 | Add support for the OpenPKG custom .spec file sections %track