From ba3a1b1183a27f01d613e373637b7a61165e0319 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 18 May 2005 15:18:43 +0000 Subject: [PATCH] - set %_tmppath to current directory so that buildroots don't conflict - clean: remove all subpackage rpms --- Makerules | 9 ++++++--- Rules.mk | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Makerules b/Makerules index 0f219067..6e0da0ca 100644 --- a/Makerules +++ b/Makerules @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2003-2005 The Trustees of Princeton University # -# $Id: Makefile,v 1.63 2005/04/11 14:46:16 mlhuang Exp $ +# $Id: Makerules,v 1.14 2005/05/04 19:13:14 mlhuang Exp $ # # Base cvsps and rpmbuild in the current directory @@ -142,7 +142,8 @@ endif ifeq ($(TAG),HEAD) RPMFLAGS += --define "date $(DATE)" endif -NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) +PACKAGES := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null) +NVR := $(word 1,$(PACKAGES)) ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm @@ -160,15 +161,17 @@ SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros # Base rpmbuild in the current directory .rpmmacros: echo "%_topdir $(HOME)" > $@ + echo "%_tmppath $(HOME)/tmp" >> $@ # Remove files generated by this package clean: rm -rf \ BUILD/$(Base0) \ - RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \ + $(foreach subpackage,$(PACKAGES),RPMS/*/$(subpackage)*) \ SOURCES/$(Base0)* SOURCES/$(package)* \ SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \ SRPMS/$(NVR).src.rpm \ + tmp \ .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE)) .PHONY: all clean diff --git a/Rules.mk b/Rules.mk index 0f219067..6e0da0ca 100644 --- a/Rules.mk +++ b/Rules.mk @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2003-2005 The Trustees of Princeton University # -# $Id: Makefile,v 1.63 2005/04/11 14:46:16 mlhuang Exp $ +# $Id: Makerules,v 1.14 2005/05/04 19:13:14 mlhuang Exp $ # # Base cvsps and rpmbuild in the current directory @@ -142,7 +142,8 @@ endif ifeq ($(TAG),HEAD) RPMFLAGS += --define "date $(DATE)" endif -NVR := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) +PACKAGES := $(shell rpmquery $(RPMFLAGS) --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null) +NVR := $(word 1,$(PACKAGES)) ARCH := $(shell rpmquery $(RPMFLAGS) --queryformat '%{ARCH}\n' --specfile SPECS/$(notdir $(SPEC)).in 2>/dev/null | head -1) all: RPMS/$(ARCH)/$(NVR).$(ARCH).rpm SRPMS/$(NVR).src.rpm @@ -160,15 +161,17 @@ SRPMS/$(NVR).src.rpm: SPECS/$(notdir $(SPEC)) $(SOURCES) .rpmmacros # Base rpmbuild in the current directory .rpmmacros: echo "%_topdir $(HOME)" > $@ + echo "%_tmppath $(HOME)/tmp" >> $@ # Remove files generated by this package clean: rm -rf \ BUILD/$(Base0) \ - RPMS/$(ARCH)/$(NVR).$(ARCH).rpm \ + $(foreach subpackage,$(PACKAGES),RPMS/*/$(subpackage)*) \ SOURCES/$(Base0)* SOURCES/$(package)* \ SPECS/$(notdir $(SPEC)).in SPECS/$(notdir $(SPEC)) $(MK) \ SRPMS/$(NVR).src.rpm \ + tmp \ .cvsps/$(subst /,#,$(CVSROOT)/$(MODULE)) .PHONY: all clean -- 2.47.0