[freeside-commits] freeside Makefile,1.163,1.164

Ivan,,, ivan at wavetail.420.am
Mon Jul 21 11:58:51 PDT 2008


Update of /home/cvs/cvsroot/freeside
In directory wavetail.420.am:/tmp/cvs-serv26066

Modified Files:
	Makefile 
Log Message:
add framework for running Mason components standalone

Index: Makefile
===================================================================
RCS file: /home/cvs/cvsroot/freeside/Makefile,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- Makefile	13 May 2008 19:13:29 -0000	1.163
+++ Makefile	21 Jul 2008 18:58:47 -0000	1.164
@@ -3,8 +3,8 @@
 #solaris and perhaps other very weirdass /bin/sh
 #SHELL="/bin/ksh"
 
-DB_TYPE = Pg
-#DB_TYPE = mysql
+#DB_TYPE = Pg
+DB_TYPE = mysql
 
 DB_USER = freeside
 DB_PASSWORD=
@@ -108,11 +108,14 @@
 #for now, same db as specified in DATASOURCE... eventually, otherwise?
 RT_DB_DATABASE = freeside
 
+# for cvs-upgrade-deploy target, the username who checked out the CVS copy.
+CVS_USER = ivan
+
+# for auto-version updates, so we can "make release" more things automatically
 RPM_SPECFILE = rpm/freeside.spec
 
 #---
 
-
 #rt/config.layout.in
 RT_PATH = /opt/rt3
 
@@ -129,6 +132,7 @@
 	@echo "supported targets:"
 	@echo "                   create-database create-config"
 	@echo "                   install deploy"
+	@echo "                   cvs-upgrade-deploy"
 	@echo "                   configure-rt create-rt"
 	@echo "                   clean help"
 	@echo
@@ -165,11 +169,6 @@
 	cp -r masondocs ${FREESIDE_DOCUMENT_ROOT}
 	chown -R freeside:freeside ${FREESIDE_DOCUMENT_ROOT}
 	cp htetc/handler.pl ${MASON_HANDLER}
-	  perl -p -i -e "\
-	    s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
-	    s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
-	    s'%%%MASONDATA%%%'${MASONDATA}'g;\
-	  " ${MASON_HANDLER}
 	[ ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true
 	chown -R freeside ${MASONDATA}
 
@@ -178,14 +177,10 @@
 	ln -s ${FREESIDE_PATH}/httemplate ${FREESIDE_DOCUMENT_ROOT}
 	cp htetc/handler.pl ${MASON_HANDLER}
 	perl -p -i -e "\
-	  s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
-	  s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
-	  s'%%%MASONDATA%%%'${MASONDATA}'g;\
 	  s'###use Module::Refresh;###'use Module::Refresh;'; \
 	  s'###Module::Refresh->refresh;###'Module::Refresh->refresh;'; \
 	" ${MASON_HANDLER} || true
 
-
 perl-modules:
 	cd FS; \
 	[ -e Makefile ] || perl Makefile.PL; \
@@ -196,6 +191,9 @@
 	perl -p -i -e "\
 	  s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
 	  s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
+	  s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
+	  s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
+	  s'%%%MASONDATA%%%'${MASONDATA}'g;\
 	" blib/lib/FS/*.pm;\
 	perl -p -i -e "\
 	  s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
@@ -277,6 +275,12 @@
 	${HTTPD_RESTART}
 	${FREESIDE_RESTART}
 
+cvs-upgrade-deploy:
+	su ${CVS_USER} -c 'cvs update -d -P'
+	make install-perl-modules
+	su freeside -c "freeside-upgrade ${CVS_USER}" #not really the same user
+	make deploy
+
 dev: dev-perl-modules dev-docs
 
 create-database:



More information about the freeside-commits mailing list