X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=Makefile;h=adcadd31f8948f5d76415ee775087161f6b92b04;hb=cb90d32aa1db8564d890cca3231784340cd5d964;hp=017f4a7383be044d3a90e4d9394cafc6eec4105b;hpb=e328ac561e5f8ba6fdb54f9d04c8b237993bdeb3;p=freeside.git diff --git a/Makefile b/Makefile index 017f4a738..adcadd31f 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,26 @@ DATASOURCE = DBI:Pg:dbname=freeside DB_USER = freeside DB_PASSWORD= +#changable now (some things which should go to the others still go to CONF) +FREESIDE_CONF = /usr/local/etc/freeside +FREESIDE_LOG = /usr/local/etc/freeside +FREESIDE_LOCK = /usr/local/etc/freeside +FREESIDE_CACHE = /usr/local/etc/freeside +FREESIDE_EXPORT = /usr/local/etc/freeside + +MASON_HANDLER = ${FREESIDE_CONF}/handler.pl +MASONDATA = ${FREESIDE_CACHE}/masondata + +#mod_perl v1 +APACHE_VERSION = 1 +#mod_perl v2 prereleases up to and including 1.999_21 +#APACHE_VERSON = 1.99 +#mod_perl v2 proper and prereleases 1.999_22 and after +#APACHE_VERSION = 2 + +# only mason now TEMPLATE = mason -MASON_HANDLER = /usr/local/etc/freeside/handler.pl -MASONDATA = /usr/local/etc/freeside/masondata - #deb FREESIDE_DOCUMENT_ROOT = /var/www/freeside #redhat, fedora, mandrake @@ -89,8 +104,7 @@ RT_DB_DATABASE = freeside #--- -#not changable yet -FREESIDE_CONF = /usr/local/etc/freeside + #rt/config.layout.in RT_PATH = /opt/rt3 @@ -98,8 +112,8 @@ RT_PATH = /opt/rt3 FREESIDE_PATH = `pwd` PERL_INC_DEV_KLUDGE = /usr/local/share/perl/5.8.8/ -VERSION=1.7.0 -TAG=freeside_1_7_0 +VERSION=1.9.0cvs +TAG=freeside_1_9_0 help: @echo "supported targets:" @@ -122,7 +136,8 @@ help: #@echo " upload-docs release update-webdemo" -masondocs: htmlman httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/* httemplate/*/*/*/*/* +#masondocs: htmlman httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/* httemplate/*/*/*/*/* +masondocs: htmlman httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/* rm -rf masondocs cp -pr httemplate masondocs touch masondocs @@ -152,11 +167,13 @@ forcehtmlman: install-docs: docs [ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true cp -r ${TEMPLATE}docs ${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; \ - " ${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} @@ -167,6 +184,7 @@ dev-docs: 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 @@ -178,7 +196,20 @@ perl-modules: make; \ perl -p -i -e "\ s/%%%VERSION%%%/${VERSION}/g;\ - " blib/lib/FS.pm; \ + " blib/lib/FS.pm;\ + perl -p -i -e "\ + s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\ + " blib/lib/FS/*.pm;\ + perl -p -i -e "\ + s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\ + " blib/lib/FS/part_export/*.pm;\ + perl -p -i -e "\ + s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\ + s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\ + s|%%%FREESIDE_LOCK%%%|${FREESIDE_LOCK}|g;\ + s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\ + s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\ + " blib/script/* install-perl-modules: perl-modules [ -L ${PERL_INC_DEV_KLUDGE}/FS ] \ @@ -207,11 +238,13 @@ install-init: ${INIT_INSTALL} install-apache: + [ -e ${APACHE_CONF}/freeside-base.conf ] && rm ${APACHE_CONF}/freeside-base.conf || true [ -d ${APACHE_CONF} ] && \ - ( install -o root -m 755 htetc/freeside-base.conf ${APACHE_CONF} && \ + ( install -o root -m 755 htetc/freeside-base${APACHE_VERSION}.conf ${APACHE_CONF} && \ ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \ perl -p -i -e "\ s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \ + s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \ " ${APACHE_CONF}/freeside-*.conf \ ) || true @@ -222,8 +255,7 @@ install-selfservice: ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; perl Makefile.PL && make" ;\ ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\ scp ~freeside/.ssh/id_dsa.pub ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\ - ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo ${SELFSERVICE_INSTALL_USERADD} freeside; sudo install -d -o freeside -m 600 ~freeside/.ssh/" ;\ - ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo ${SELFSERVICE_INSTALL_USERADD} freeside; sudo install -o freeside -m 600 ./id_dsa.pub ~freeside/.ssh/authorized_keys" ;\ + ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo ${SELFSERVICE_INSTALL_USERADD} freeside; sudo install -d -o freeside -m 600 ~freeside/.ssh/; sudo install -o freeside -m 600 ./id_dsa.pub ~freeside/.ssh/authorized_keys" ;\ ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo install -o freeside -d /usr/local/freeside" ;\ done @@ -263,14 +295,14 @@ create-config: install-perl-modules cp `ls -d conf/[a-z]* | grep -v CVS` "${FREESIDE_CONF}/conf.${DATASOURCE}" chown -R freeside "${FREESIDE_CONF}/conf.${DATASOURCE}" - mkdir "${FREESIDE_CONF}/counters.${DATASOURCE}" - chown freeside "${FREESIDE_CONF}/counters.${DATASOURCE}" + mkdir "${FREESIDE_CACHE}/counters.${DATASOURCE}" + chown freeside "${FREESIDE_CACHE}/counters.${DATASOURCE}" - mkdir "${FREESIDE_CONF}/cache.${DATASOURCE}" - chown freeside "${FREESIDE_CONF}/cache.${DATASOURCE}" + mkdir "${FREESIDE_CACHE}/cache.${DATASOURCE}" + chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}" - mkdir "${FREESIDE_CONF}/export.${DATASOURCE}" - chown freeside "${FREESIDE_CONF}/export.${DATASOURCE}" + mkdir "${FREESIDE_EXPORT}/export.${DATASOURCE}" + chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}" configure-rt: cd rt; \ @@ -304,13 +336,13 @@ create-rt: configure-rt rt/sbin/rt-setup-database --action insert_initial \ && rt/sbin/rt-setup-database --action insert --datafile ${RT_PATH}/etc/initialdata \ || true + +install-rt: perl -p -i -e "\ s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\ s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\ s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\ " ${RT_PATH}/etc/RT_SiteConfig.pm - -install-rt: [ ${RT_ENABLED} -eq 1 ] && ( cd rt; make install ) || true clean: