From 9a90f2af0663c9b4e9611e044fd25349425d1aec Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 21 Jul 2008 18:58:47 +0000 Subject: add framework for running Mason components standalone --- Makefile | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a280889..2ad1915 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ FREESIDE_URL = "http://localhost/freeside/" #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 @@ help: @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 @@ install-docs: docs 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 @@ dev-docs: 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-modules: 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 @@ deploy: install ${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: -- cgit v1.1