gunnar: server/make-helper package.mk,1.7,1.8 pear.mk,1.1,1.2

cvs at kolab.org cvs at kolab.org
Mon Jan 11 23:35:53 CET 2010


Author: gunnar

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

Modified Files:
	package.mk pear.mk 
Log Message:
Integrate pear.mk with kolab.mk and package.mk

Index: package.mk
===================================================================
RCS file: /kolabrepository/server/make-helper/package.mk,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- package.mk	11 Jan 2010 16:52:43 -0000	1.7
+++ package.mk	11 Jan 2010 22:35:51 -0000	1.8
@@ -10,6 +10,8 @@
 
 RELEASETARGET ?= $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
 
+CLEAN_EXTRA ?=
+
 # Default target to generate the source rpm package
 .PHONY: all
 all: dist
@@ -42,6 +44,10 @@
 	rm -f *.tar.gz *.tgz *.tar.bz2
 	rm -f *~
 	rm -f package.patch
+ifeq ($(CLEAN_EXTRA),)
+else
+	rm -rf $(CLEAN_EXTRA)
+endif
 
 # Target for fetching the source rpm into the current directory
 $(RELEASETARGET): $(KOLABRPMPKG)/$(RELEASETARGET)

Index: pear.mk
===================================================================
RCS file: /kolabrepository/server/make-helper/pear.mk,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pear.mk	11 Jan 2010 22:20:52 -0000	1.1
+++ pear.mk	11 Jan 2010 22:35:51 -0000	1.2
@@ -1,17 +1,12 @@
-include ../../Base.mk
+STAGING = ../../stage
 
-# Determine the staging area for collecting new source rpms
-ifeq "x$(STAGING)" "x"
-  STAGING = ../../stage
-endif
+include ../../make-helper/kolab.mk
 
 # Set the default upstream directory.
-ifeq "x$(UPSTREAM_DIR)" "x"
-  UPSTREAM_DIR = ../../upstream
-endif
+UPSTREAM_DIR ?= ../../upstream
 
 # Location of the PEAR script
-PEAR=$(HOME)/bin/pear
+PEAR=$(KOLABDIR)/bin/pear
 
 # Determine the pear package name from the package.info file
 PEAR_PKGDIR = $(shell grep "^pear_pkgdir=" package.info | sed -e "s/pear_pkgdir='\([A-Za-z0-9\-\_\/]*\)'\s*/\1/")
@@ -71,8 +66,8 @@
 FILESERVER = kolabfiles
 
 # Set the default package file end
-ifeq "x$(FILEEND)" "x"
-  FILEEND=tgz
+ifeq ($(FILEEND),)
+FILEEND=tgz
 endif
 
 # Generate the full package name
@@ -124,37 +119,9 @@
 GIT_REPO_CO_CMD=git clone
 GIT_REPO_SC_CMD=git checkout
 
-# Default target to generate the source rpm package
-.PHONY: all
-all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-# Target for placing the source rpm in the staging area
-.PHONY: dist
-dist: $(STAGING)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
-# Target for installing the binary rpm package in our current Kolab
-# server installation
-.PHONY: install
-install: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
-	$(RPM) -Uhv --force $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
-
-# Target for cleaning up the files that can be generated with this Makefile
-.PHONY: clean
-clean:
-	rm -rf $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-	rm -rf $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
-	rm -rf $(KOLABRPMSRC)/$(PACKAGE)
-	rm -rf $(KOLABRPMTMP)/$(PACKAGE)*
-	rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-	rm -rf $(SOURCE_0)
-	rm -rf *~
-	rm -rf tmp
-	rm -rf $(PACKAGE).spec
-	rm -rf package.patch
+CLEAN_EXTRA = tmp $(PACKAGE).spec
 
-# Target for fetching the source rpm into the current directory
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-	cp $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
+include ../../make-helper/package.mk
 
 # Target location for the repository checkout
 $(UPSTREAM)/$(SAFE_COMMIT):
@@ -172,18 +139,10 @@
 $(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec: Makefile $(PACKAGE).spec $(EXTRA) $(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0)
 	cp $(PACKAGE).spec $(EXTRA) $(KOLABRPMSRC)/$(PACKAGE)
 
-# Target for the source file in the src rpm directory.
-$(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0): $(KOLABRPMSRC)/$(PACKAGE) $(SOURCE_0)
-	cp $(SOURCE_0) $(KOLABRPMSRC)/$(PACKAGE)/
-
 # Target for the src rpm directory.
 $(KOLABRPMSRC)/$(PACKAGE):
 	test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
 
-# Target for retrieving the source package
-$(SOURCE_0):
-	wget -c "$(SOURCE_URL)/$(SOURCE_0)"
-
 # Get the repository checkout
 ifeq ($(PACKAGE_VC),CVS)
 $(UPSTREAM)/$(SAFE_COMMIT)/$(CVS_REPO)/$(PEAR_PKGDIR): $(UPSTREAM)/$(SAFE_COMMIT)
@@ -238,14 +197,6 @@
 .PHONY:snapshot
 snapshot: tmp/.sent
 endif
-
-# 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)
 
 # Prepare the patch for the package.
 package.patch: $(PATCHES)





More information about the commits mailing list