gunnar: server/make-helper openpkg-patched.mk, 1.1, 1.2 package.mk, 1.1, 1.2

cvs at kolab.org cvs at kolab.org
Tue Jan 5 00:02:21 CET 2010


Author: gunnar

Update of /kolabrepository/server/make-helper
In directory doto:/tmp/cvs-serv7653/make-helper

Modified Files:
	openpkg-patched.mk package.mk 
Log Message:
Fix make dist targets. The 'dist' target is working again.

Index: openpkg-patched.mk
===================================================================
RCS file: /kolabrepository/server/make-helper/openpkg-patched.mk,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- openpkg-patched.mk	9 Dec 2009 23:08:07 -0000	1.1
+++ openpkg-patched.mk	4 Jan 2010 23:02:19 -0000	1.2
@@ -1,5 +1,5 @@
 # Target for preparing the source area and building the package
-$(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec: Makefile $(EXTRA) $(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0)
+$(KOLABRPMSRC)/$(PACKAGE)/kolab.patch: $(EXTRA)
 	cp $(EXTRA) $(KOLABRPMSRC)/$(PACKAGE)
 
 # Target for fetching the original openpkg package
@@ -9,9 +9,13 @@
 # Target for the src rpm directory.
 $(KOLABRPMSRC)/$(PACKAGE): $(PACKAGE)-$(DOWNLOAD_VERSION)-$(OPENPKG_RELEASE).src.rpm
 	$(RPM) -ihv $(PACKAGE)-$(DOWNLOAD_VERSION)-$(OPENPKG_RELEASE).src.rpm
+	touch $(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec
+
+# Target for the src rpm spec file.
+$(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec: $(KOLABRPMSRC)/$(PACKAGE)
 
 # Target for patching the spec file
-$(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec.patched: $(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec
+$(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec.patched: $(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)/kolab.patch
 	cd $(KOLABRPMSRC)/$(PACKAGE) && patch < kolab.patch
 	touch $(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec.patched
 

Index: package.mk
===================================================================
RCS file: /kolabrepository/server/make-helper/package.mk,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- package.mk	9 Dec 2009 23:08:07 -0000	1.1
+++ package.mk	4 Jan 2010 23:02:19 -0000	1.2
@@ -6,16 +6,12 @@
 # includes building the binary package which is an additional check for
 # the final release. Thus it is the default target.
 .PHONY: dist
-dist: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm all
-	test -d $(STAGING) || mkdir $(STAGING)
-	cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(STAGING)
+dist: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm $(STAGING)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
 
 # Target for placing the source rpm in the staging area. This is the soft
 # variant that is quicker and omits the binary package.
 .PHONY: sdist
-sdist: all
-	test -d $(STAGING) || mkdir $(STAGING)
-	cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(STAGING)
+sdist: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
 
 # Target for installing the binary rpm package in our current Kolab
 # server installation
@@ -37,7 +33,7 @@
 
 # Target for fetching the source rpm into the current directory
 $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-	cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
+	cp $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
 
 # Target for the source file in the src rpm directory.
 $(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0): $(KOLABRPMSRC)/$(PACKAGE) $(SOURCE_0)
@@ -54,3 +50,11 @@
 	do                              \
 	  cat $$PATCH >> package.patch; \
 	done
+
+# Prepare the staging area
+$(STAGING):
+	mkdir -p $(STAGING)
+
+# Final package location
+$(STAGING)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: $(STAGING) $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+	cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(STAGING)





More information about the commits mailing list