gunnar: server/pear Horde.mk,1.1,1.2
cvs at kolab.org
cvs at kolab.org
Mon May 18 19:36:22 CEST 2009
Author: gunnar
Update of /kolabrepository/server/pear
In directory doto:/tmp/cvs-serv6840
Modified Files:
Horde.mk
Log Message:
Enable git snapshots for Horde packages.
Index: Horde.mk
===================================================================
RCS file: /kolabrepository/server/pear/Horde.mk,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Horde.mk 18 May 2009 16:12:28 -0000 1.1
+++ Horde.mk 18 May 2009 17:36:20 -0000 1.2
@@ -1,55 +1,15 @@
-# If home is unset this Makefile assumes the Kolab server installation
-# resides in /kolab. If this is not the case this Makefile must be
-# called using
-#
-# HOME="/mykolabroot" make TARGET
-#
-ifeq "x$(HOME)" "x"
- HOME = /kolab
-endif
-
-# If HOME is set to /root it is likely that somebody is calling this
-# Makefile as root user. In this case this Makefile assumes that the
-# Kolab server installation resides in /kolab.
-#
-# In the (hopefully) unlikely event that somebody really installed the
-# Kolab server in /root this Makefile will fail.
-ifeq "x$(HOME)" "x/root"
- HOME = /kolab
-endif
-
-# Set the location of the rpm binary
-ifeq "x$(RPM)" "x"
- RPM = $(HOME)/bin/openpkg rpm
-endif
-
-# Set the location for rpm source package installations
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = $(HOME)/RPM/SRC
-endif
-
-# Set the location for rpm packages
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = $(HOME)/RPM/PKG
-endif
-
-# Set the location for the rpm temporary directory
-ifeq "x$(KOLABRPMTMP)" "x"
- KOLABRPMTMP = $(HOME)/RPM/TMP
-endif
-
-# Determine the suffix for binary packages on this system
-ifeq "x$(PLATTAG)" "x"
- PLATTAG = $(shell $(RPM) -q --qf="%{ARCH}-%{OS}" openpkg)-$(HOME:/%=%)
-endif
+include ../Base.mk
# Determine the staging area for collecting new source rpms
ifeq "x$(STAGING)" "x"
STAGING = ../../stage
endif
+# Location of the PEAR script
+PEAR=$(HOME)/bin/pear
+
# Determine the horde package name from the *.spec file
-HORDE_PKGDIR = $(shell grep "%define[ ]*V_horde_pkgdir" *.spec | sed -e "s/.*V_horde_pkgdir \([A-Za-z\-\_]*\).*/\1/")
+HORDE_PKGDIR = $(shell grep "%define[ ]*V_horde_pkgdir" *.spec | sed -e "s/.*V_horde_pkgdir \([A-Za-z\-\_]*\)\s*/\1/")
# Determine the horde package name from the *.spec file
HORDE_PACKAGE = $(shell grep "%define[ ]*V_horde_package" *.spec | sed -e "s/.*V_horde_package \([A-Za-z\-\_]*\).*/\1/")
@@ -61,7 +21,7 @@
PACKAGE_VC = $(shell grep "%define[ ]*V_package_origin" *.spec | sed -e "s/.*V_package_origin VC-\([A-Z]*\).*/\1/")
# Determine the package name from the *.spec file
-PACKAGE = $(shell grep "%define[ ]*V_package " *.spec | sed -e "s/.*V_package \([A-Za-z\-\_]*\).*/\1/")
+PACKAGE = $(shell grep "%define[ ]*V_package " *.spec | sed -e "s/.*V_package \([A-Za-z\-\_]*\)\s*/\1/")
# Determine the package version from the *.spec file
VERSION = $(shell grep "%define[ ]*V_version" *.spec | sed -e "s/.*V_version\s*\([0-9.a-z]*\).*/\1/")
@@ -87,15 +47,31 @@
# Generate a list of extra files for the package
EXTRA=ChangeLog package.patch
-# CVS information
+# Temporary repository checkout location
+ifeq ($(PACKAGE_VC),CVS)
UPSTREAM=../upstream/cvs
+else
+ifeq ($(PACKAGE_VC),GIT)
+UPSTREAM=../upstream/git
+endif
+endif
+
+# The current date
+DATE=$(shell date +%Y-%m-%d)
+
+# CVS information
CVS_REPO=framework
CVS_REPO_URL=:pserver:cvsread at anoncvs.horde.org:/repository
CVS_REPO_UP_CMD=cvs update
CVS_REPO_CO_CMD=cvs -d $(CVS_REPO_URL) co
CVS_REPO_SC_CMD=cvs update -r
-DATE=$(shell date +%Y-%m-%d)
-PEAR=$(HOME)/bin/pear
+
+# GIT information
+GIT_REPO=horde
+GIT_REPO_URL=git://dev.horde.org/horde/git/$(GIT_REPO)
+GIT_REPO_UP_CMD=git pull origin master
+GIT_REPO_CO_CMD=git clone
+GIT_REPO_SC_CMD=git checkout
# Default target to generate the source rpm package
.PHONY: all
@@ -121,11 +97,11 @@
ifeq ($(PACKAGE_VC),CVS)
.PHONY: $(UPSTREAM)/$(CVS_REPO)
$(UPSTREAM)/$(CVS_REPO):
- if [ -e $(UPSTREAM)/$(CVS_REPO) ]; then \
+ if [ -e $(UPSTREAM)/$(CVS_REPO) ]; then \
cd $(UPSTREAM)/$(CVS_REPO) && $(CVS_REPO_SC_CMD) "$(COMMIT)"; \
- else \
- @echo The password is 'horde'; \
- cvs -d $(CVS_REPO_URL) login; \
+ else \
+ @echo The password is 'horde'; \
+ cvs -d $(CVS_REPO_URL) login; \
cd $(UPSTREAM) && $(CVS_REPO_CO_CMD) $(CVS_REPO); \
cd $(UPSTREAM)/$(CVS_REPO) && $(CVS_REPO_SC_CMD) "$(COMMIT)"; \
fi;
@@ -133,12 +109,10 @@
ifeq ($(PACKAGE_VC),GIT)
.PHONY: $(UPSTREAM)/$(GIT_REPO)
$(UPSTREAM)/$(GIT_REPO):
- if [ -e $(UPSTREAM)/$(GIT_REPO) ]; then \
- cd $(UPSTREAM)/$(GIT_REPO) && $(GIT_REPO_SC_CMD) "$(COMMIT)"; \
+ if [ -e $(UPSTREAM)/$(GIT_REPO) ]; then \
+ cd $(UPSTREAM)/$(GIT_REPO) && $(GIT_REPO_UP_CMD); \
else \
- cvs -d $(GIT_REPO_URL) login; \
- cd $(UPSTREAM) && $(GIT_REPO_CO_CMD) $(GIT_REPO); \
- cd $(UPSTREAM)/$(GIT_REPO) && $(GIT_REPO_SC_CMD) "$(COMMIT)"; \
+ cd $(UPSTREAM) && $(GIT_REPO_CO_CMD) $(GIT_REPO_URL); \
fi;
endif
endif
@@ -175,8 +149,11 @@
endif
# Target for the src rpm directory.
-$(KOLABRPMSRC)/$(PACKAGE)/$(SOURCE_0): $(SOURCE_0)
+$(KOLABRPMSRC)/$(PACKAGE):
test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(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)/
# Prepare the patch for the package.
More information about the commits
mailing list