Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / Makefile
index 67bf83c..3af5da8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,10 +29,15 @@ 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
+#APACHE_VERSION=2.4
+APACHE_VERSION := $(shell /usr/sbin/apache2 -v | grep -q '\/2\.4\.' && echo '2.4' || echo '2')
+
+#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
+FREESIDE_DOCUMENT_ROOT := $(shell [ ${APACHE_VERSION} = '2.4' ] && echo '/var/www/html/freeside' || echo '/var/www/freeside')
 
-#deb
-FREESIDE_DOCUMENT_ROOT = /var/www/freeside
 #redhat, fedora, mandrake
 #FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
 #freebsd
@@ -50,7 +55,7 @@ INIT_FILE = /etc/init.d/freeside
 #INIT_FILE = /usr/local/etc/rc.d/011.freeside.sh
 
 #deb
-INIT_INSTALL = PATH=$PATH:/sbin /usr/sbin/update-rc.d freeside defaults 23 01
+INIT_INSTALL = PATH=${PATH}:/sbin /usr/sbin/update-rc.d freeside defaults 23 01
 #redhat, fedora
 #INIT_INSTALL = /sbin/chkconfig freeside on
 #not necessary (freebsd)
@@ -70,10 +75,11 @@ HTTPD_RESTART = /etc/init.d/apache2 restart
 #HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
 
 #(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
+#debian unstable/8.0+, apache2.4
+#APACHE_CONF = /etc/apache2/conf-available
+APACHE_CONF := $(shell [ ${APACHE_VERSION} = '2.4' ] && echo '/etc/apache2/conf-available' || echo '/etc/apache2/conf.d')
 
 INSSERV_OVERRIDE = /etc/insserv/overrides
 
@@ -106,7 +112,7 @@ 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
@@ -123,7 +129,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.20.2/
 
 VERSION := `grep '^$$VERSION' FS/FS.pm | cut -d\' -f2`
 TAG := freeside_`grep '^$$VERSION' FS/FS.pm | cut -d\' -f2 | perl -pe 's/\./_/g'`
@@ -188,7 +194,8 @@ install-docs: docs
        " ${MASON_HANDLER} || true
        mkdir -p ${FREESIDE_EXPORT}/profile
        chown freeside ${FREESIDE_EXPORT}/profile
-       [ ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true
+       rm -r ${MASONDATA}
+       mkdir ${MASONDATA}
        chown -R freeside ${MASONDATA}
 
 dev-docs:
@@ -262,8 +269,8 @@ 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
+       install -D -o freeside -m 444 etc/*.sty \
+         /usr/local/share/texmf/tex/latex/
        texhash /usr/local/share/texmf
 
 install-init: