fix rare FP rounding errors on void, RT#84904
[freeside.git] / Makefile
index ee42a59..7055c29 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,15 +26,9 @@ MASONDATA = ${FREESIDE_CACHE}/masondata
 #package maintainers
 DIST_CONF = ${FREESIDE_CONF}/default_conf
 
-#mod_perl v2 1.999_22 on Apache 2.0 through 2.3 (Debian ancient through 7.x)
-#APACHE_VERSION=2
-#Apache 2.4 (Debian 8.x)
-APACHE_VERSION=2.4
-
-#deb (-7 and upgrades)
-FREESIDE_DOCUMENT_ROOT = /var/www/freeside
-#deb (new installs of 8+) (plus needs more work w/new auth)
-#FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
+#deb
+FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
+
 #redhat, fedora, mandrake
 #FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
 #freebsd
@@ -46,6 +40,8 @@ FREESIDE_DOCUMENT_ROOT = /var/www/freeside
 #apache
 #FREESIDE_DOCUMENT_ROOT = /usr/local/apache/htdocs/freeside
 
+POD2HTML_DIR = ${FREESIDE_DOCUMENT_ROOT}/docs/library
+
 #deb, redhat, fedora, mandrake, suse, others?
 INIT_FILE = /etc/init.d/freeside
 #freebsd
@@ -74,9 +70,6 @@ HTTPD_RESTART = /etc/init.d/apache2 restart
 #(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf)
 #debian unstable/8.0+, apache2.4
 APACHE_CONF = /etc/apache2/conf-available
-#deb (3.1+), apache2
-#APACHE_CONF = /etc/apache2/conf.d
-
 INSSERV_OVERRIDE = /etc/insserv/overrides
 
 FREESIDE_RESTART = ${INIT_FILE} restart
@@ -108,12 +101,12 @@ RT_ENABLED = 1
 RT_DOMAIN = example.com
 RT_TIMEZONE = US/Pacific
 #RT_TIMEZONE = US/Eastern
-FREESIDE_URL = "http://192.168.1.6/freeside/"
+FREESIDE_URL = "http://localhost/freeside/"
 
 #for now, same db as specified in DATASOURCE... eventually, otherwise?
 RT_DB_DATABASE = freeside
 
-TORRUS_ENABLED = 0
+#TORRUS_ENABLED = 1
 
 # for auto-version updates, so we can "make release" more things automatically
 RPM_SPECFILE = rpm/freeside.spec
@@ -125,7 +118,7 @@ RT_PATH = /opt/rt3
 
 #only used for dev kludge now, not a big deal
 FREESIDE_PATH = `pwd`
-PERL_INC_DEV_KLUDGE = /usr/local/share/perl/5.14.2/
+PERL_INC_DEV_KLUDGE = /usr/local/share/perl/5.28.1/
 
 VERSION := `grep '^$$VERSION' FS/FS.pm | cut -d\' -f2`
 TAG := freeside_`grep '^$$VERSION' FS/FS.pm | cut -d\' -f2 | perl -pe 's/\./_/g'`
@@ -190,8 +183,10 @@ install-docs: docs
        " ${MASON_HANDLER} || true
        mkdir -p ${FREESIDE_EXPORT}/profile
        chown freeside ${FREESIDE_EXPORT}/profile
-       [ ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true
-       chown -R freeside ${MASONDATA}
+       rm -rf ${MASONDATA}/*
+       mkdir ${MASONDATA}/cache || true
+       mkdir ${MASONDATA}/obj || true
+       chown -f -R freeside ${MASONDATA} || true
 
 dev-docs:
        [ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true
@@ -211,6 +206,7 @@ perl-modules:
        perl -p -i -e "\
          s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
          s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
+         s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
          s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
          s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
          s'%%%RT_PATH%%%'${RT_PATH}'g; \
@@ -229,7 +225,7 @@ perl-modules:
        " blib/lib/FS/part_export/*.pm;\
        perl -p -i -e "\
          s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
-       " blib/lib/FS/cust_main/*.pm blib/lib/FS/cust_pkg/*.pm;\
+       " blib/lib/FS/cust_main/*.pm blib/lib/FS/cust_pkg/*.pm blib/lib/FS/contact/*.pm;\
        perl -p -i -e "\
          s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
        " blib/lib/FS/Daemon/*.pm;\
@@ -264,9 +260,11 @@ dev-perl-modules: perl-modules
        ln -sf ${FREESIDE_PATH}/FS/blib/lib/FS ${PERL_INC_DEV_KLUDGE}/FS
 
 install-texmf: 
-       install -D -o freeside -m 444 etc/longtable.sty \
-         /usr/local/share/texmf/tex/latex/longtable.sty
+       mkdir -p /usr/local/share/texmf/tex/latex
+       install -D -o freeside -m 444 etc/*.sty \
+         /usr/local/share/texmf/tex/latex/
        texhash /usr/local/share/texmf
+       install -D -o root -m 444 etc/GnuMICR.otf /usr/local/etc/freeside
 
 install-init:
        #[ -e ${INIT_FILE} ] || install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
@@ -282,7 +280,7 @@ install-init:
 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${APACHE_VERSION}.conf ${APACHE_CONF} && \
+         ( install -o root -m 755 htetc/freeside-base2.4.conf ${APACHE_CONF} && \
            ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
            ( [ ${TORRUS_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-torrus.conf ${APACHE_CONF} || true ) && \
            perl -p -i -e "\
@@ -291,8 +289,8 @@ install-apache:
              s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
            " ${APACHE_CONF}/freeside-*.conf \
          ) || true
-       [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true
-       [ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
+       [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base2.4 ) || true
+       [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
        [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true
        [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true
 
@@ -320,7 +318,13 @@ install-chown:
        chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}"
        chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}"
 
-install: install-perl-modules install-docs install-init install-apache install-rt install-torrus install-texmf install-chown
+install-pod2html:
+       echo "${POD2HTML_DIR}"
+       mkdir -p "${POD2HTML_DIR}"
+       perl -IFS -MFS::Misc::Pod2Html -e "FS::Misc::Pod2Html::fs_pod2html_from_src('${POD2HTML_DIR}');"
+       chown freeside:freeside -R "${POD2HTML_DIR}"
+
+install: install-perl-modules install-docs install-init install-apache install-rt install-torrus install-texmf install-chown install-pod2html
 
 deploy: install
        ${HTTPD_RESTART}
@@ -395,6 +399,7 @@ create-rt: configure-rt
 
 install-rt: 
        if [ ${RT_ENABLED} -eq 1 ]; then ( cd rt; make install ); fi
+       if [ ${RT_ENABLED} -eq 1 ]; then cp -r rt/share/static/images ${FREESIDE_DOCUMENT_ROOT}/rt/NoAuth/ ;fi
        if [ ${RT_ENABLED} -eq 1 ]; then perl -p -i -e "\
          s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\
          s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\