gunnar: server test_environment.dist, NONE, 1.1 .cvsignore, 1.2, 1.3 Makefile, 1.102, 1.103

cvs at kolab.org cvs at kolab.org
Tue Feb 9 15:14:57 CET 2010


Author: gunnar

Update of /kolabrepository/server
In directory doto:/tmp/cvs-serv8244

Modified Files:
	.cvsignore Makefile 
Added Files:
	test_environment.dist 
Log Message:
Added a marker file that allows to indicate that we are in a test environment. It contains a few variables that define basic parameters of the environment. Added a install-server target to the central Makefile. It installs a server from binary packages.

--- NEW FILE: test_environment.dist ---
# This is a development helper that should allow quick installation
# and update of a Kolab Server from CVS HEAD.
#
# Simply copy this file from test_environment.dist to test_environment
# and adapt the settings to your need.

# The location where the binary packages should be downloaded to.
BINARY_SOURCE_DIR=/root/kolab-server-2.2.3/ix86-debian5.0 

# The location to which the Kolab server should be installed.
KOLABDIR=/kolab

Index: .cvsignore
===================================================================
RCS file: /kolabrepository/server/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- .cvsignore	23 Jun 2009 11:29:34 -0000	1.2
+++ .cvsignore	9 Feb 2010 14:14:55 -0000	1.3
@@ -1,2 +1,3 @@
 stage
 upstream
+test_environment

Index: Makefile
===================================================================
RCS file: /kolabrepository/server/Makefile,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- Makefile	22 Jan 2010 21:43:38 -0000	1.102
+++ Makefile	9 Feb 2010 14:14:55 -0000	1.103
@@ -163,7 +163,7 @@
            1st.README
 
 CURRENT_SOURCE_RELEASE = http://files.kolab.org/server/release/kolab-server-2.2.3/sources/
-CURRENT_BINARY_RELEASE = http://files.kolab.org/server/release/kolab-server-2.2.3/$(PLATTAG)/
+CURRENT_BINARY_RELEASE = http://files.kolab.org/server/release/kolab-server-2.2.3/$(PLATFORM)/
 
 PHPUNIT=$(HOME)/bin/phpunit
 
@@ -429,11 +429,49 @@
 ####################
 
 ####################
+# SETUP START
+####################
+# Sub targets for installing a server from the binary distribution.
+# The whole section is only active if we manually marked the server
+# as being a test machine (by creating the test_environment file).
+
+ifeq "x$(TEST_ENVIRONMENT)" "xYES"
+# Convenience target to install the server
+.PHONY:install-server
+install-server: $(KOLABDIR)
+
+# Downloads the binary packages for installation
+$(BINARY_SOURCE_DIR):
+	mkdir -p $@
+	cd $@ && wget -r -l1 -nd --no-parent $(CURRENT_BINARY_RELEASE)
+
+# Installs the Kolab server from the binary packages
+$(KOLABDIR): $(BINARY_SOURCE_DIR)
+	cd $(BINARY_SOURCE_DIR) && sh install-kolab.sh 2>&1 | tee kolab-install.log
+
+# Convenience target to uninstall the server
+.PHONY:clean-server
+clean-server:
+	@echo "THIS WILL COMPLETELY WIPE YOUR KOLAB SERVER INSTALLATION IN $(KOLABDIR)!!!"
+	@echo "You have 5 seconds to abort..."
+	@sleep 5
+	/kolab/bin/openpkg rpm -e `/kolab/bin/openpkg rpm -qa`
+	rm -rf $(KOLABDIR)
+endif
+
+####################
+# SETUP END
+####################
+
+####################
 # UPDATE START
 ####################
 # Sub targets for updating an installed server to the packages
 # generated from CVS.
+# The whole section is only active if we manually marked the server
+# as being a test machine (by creating the test_environment file).
 
+ifeq "x$(TEST_ENVIRONMENT)" "xYES"
 .PHONY: update
 update: dist stage/update/source
 
@@ -449,6 +487,7 @@
 	chown -R $(KOLABUSR)\: stage/update/source
 	cd stage/update/source && sh install-kolab.sh -X
 	cd stage/update/source && sh install-kolab.sh 2>&1 | tee kolab-update.log
+endif
 
 ####################
 # UPDATE END





More information about the commits mailing list