#openbsd
#FREESIDE_DOCUMENT_ROOT = /var/www/htdocs/freeside
#suse
-#FREESIDE_DOCUMENT_ROOT = /srv/www/htdocs
+#FREESIDE_DOCUMENT_ROOT = /srv/www/htdocs/freeside
#deb, redhat, mandrake, suse, others?
INIT_FILE = /etc/init.d/freeside
@echo " perl-modules install-perl-modules"
@echo " install deploy"
@echo " create-database"
+ @echo " configure-rt create-rt"
@echo " clean"
aspdocs: htmlman httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/* httemplate/*/*/*/*/*
[ "${TEMPLATE}" = "asp" ] && chown -R freeside ${ASP_GLOBAL} || true
[ "${TEMPLATE}" = "asp" ] && cp htetc/global.asa ${ASP_GLOBAL} || true
[ "${TEMPLATE}" = "mason" ] && cp htetc/handler.pl ${MASON_HANDLER} || true
+ [ "${TEMPLATE}" = "mason" ] && \
+ perl -p -i -e "\
+ s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
+ " ${MASON_HANDLER} || true
[ "${TEMPLATE}" = "mason" -a ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true
[ "${TEMPLATE}" = "mason" ] && chown -R freeside ${MASONDATA} || true
mkdir "${FREESIDE_CONF}/export.${DATASOURCE}"
chown freeside "${FREESIDE_CONF}/export.${DATASOURCE}"
+configure-rt:
+ cd rt; \
+ cp config.layout.in config.layout; \
+ perl -p -i -e "\
+ s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g;\
+ s'%%%MASONDATA%%%'${MASONDATA}'g;\
+ " config.layout; \
+ ./configure --with-layout=Freeside\
+ --with-db-type=Pg \
+ --with-db-database=freeside \
+ --with-db-rt-user=${DB_USER} \
+ --with-db-rt-pass=${DB_PASSWORD} \
+ --with-web-user=freeside \
+ --with-web-group=www
+
+create-rt: configure-rt
+ cd rt; make install
+ rt/sbin/rt-setup-database --action schema
+ rt/sbin/rt-setup-database --action insert_initial
+ rt/sbin/rt-setup-database --action insert --datafile rt/etc/initialdata
+
+
clean:
rm -rf aspdocs masondocs
cd FS; \