LP#1306019 Debian jessie prereq installer additions user/berick/lp1306019-debian-jessie-additions
authorBill Erickson <berickxx@gmail.com>
Fri, 17 Oct 2014 20:58:31 +0000 (16:58 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 17 Oct 2014 20:58:31 +0000 (16:58 -0400)
1. libperl-email-send is no longer packaged.  Install from CPAN

2. Postgres 9.3 is not packaged.  Installed 9.4

3. libpq.so is installed into /usr/lib/x86_64-linux-gnu/, which
   libdbi-drivers cannot find by default.  Create a jessie-specific
   version of the libdbi install script.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/extras/install/Makefile.debian-jessie

index 56df1f7..a0c488a 100644 (file)
@@ -2,6 +2,9 @@
 
 DIR = $(dir $(lastword $(MAKEFILE_LIST)))
 
+# 64-bit?
+JESSIE_64=$(shell uname -r | grep "amd64")
+
 export DEB_PGSQL_COMMON_MODS = \
        gcc \
        libbusiness-isbn-perl \
@@ -31,7 +34,6 @@ export DEBS = \
        libdatetime-set-perl\
        libdatetime-timezone-perl\
        libdbd-pg-perl\
-       libemail-send-perl\
        libemail-simple-perl\
        libgd-graph3d-perl\
        liblocale-maketext-lexicon-perl\
@@ -61,7 +63,7 @@ export DEBS = \
        libuniversal-require-perl\
        libunix-syslog-perl\
        libyaz-dev\
-       postgresql-client-9.3\
+       postgresql-client-9.4\
        libsoap-lite-perl\
        libbz2-dev\
        libparse-recdescent-perl\
@@ -80,30 +82,51 @@ export DEB_APACHE_DISMODS = \
 export CPAN_MODULES = \
        Business::OnlinePayment::PayPal \
        Template::Plugin::POSIX \
+       Email::Send \
        Safe
 
 export CPAN_MODULES_FORCE = \
        Business::Stripe \
        Class::DBI::Frozen::301
 
-PGSQL_SERVER_DEBS_93 = \
+PGSQL_SERVER_DEBS_94 = \
        $(DEB_PGSQL_COMMON_MODS) \
-       postgresql-9.3 \
-       postgresql-contrib-9.3 \
-       postgresql-plperl-9.3 \
-       postgresql-server-dev-9.3
+       postgresql-9.4 \
+       postgresql-contrib-9.4 \
+       postgresql-plperl-9.4 \
+       postgresql-server-dev-9.4
+
+# Install libdbi and the postgres drivers
+# TODO: verify non-64 lib dir "x86-linux-gnu" is correct below
+install_libdbi_jessie:
+       if [ ! -d $(LIBDBI) ]; then wget $(LIBDBI_HOST)/$(LIBDBI).tar.gz; fi;
+       if [ ! -d $(LIBDBI_DRIVERS) ]; then wget $(LIBDBI_HOST)/$(LIBDBI_DRIVERS).tar.gz; fi;
+       tar -zxf $(LIBDBI).tar.gz
+       tar -zxf $(LIBDBI_DRIVERS).tar.gz
+       cd $(LIBDBI) && ./configure --disable-docs && make all install
+       if [ ! -z $(JESSIE_64) ]; then \
+               cd $(LIBDBI_DRIVERS) && ./configure \
+                       --disable-docs --with-pgsql --enable-libdbi \
+                       --with-pgsql-libdir=/usr/lib/x86_64-linux-gnu/ \
+                       --with-pgsql-incdir=/usr/include/postgresql/ && make all install; \
+       else \
+               cd $(LIBDBI_DRIVERS) && ./configure \
+                       --disable-docs --with-pgsql --enable-libdbi \
+                       --with-pgsql-libdir=/usr/lib/x86-linux-gnu/ \
+                       --with-pgsql-incdir=/usr/include/postgresql/&& make all install; \
+       fi;
 
 all:
        make -f $(DIR)/Makefile.debian install_debs
        make -f $(DIR)/Makefile.debian test_for_libdbi_pkg
        make -f $(DIR)/Makefile.common install_cpan
        make -f $(DIR)/Makefile.common install_cpan_force
-       make -f $(DIR)/Makefile.common install_libdbi
+       make -f $(DIR)/Makefile.common install_libdbi_jessie
        make -f $(DIR)/Makefile.debian install_js_sm
        make -f $(DIR)/Makefile.debian debian_sys_config
 
 install_postgres_server:
-       make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_SERVER_DEBS_93)"
+       make -f $(DIR)/Makefile.debian DEBS="$(PGSQL_SERVER_DEBS_94)"
 
 clean:
        make -f $(DIR)/Makefile.common clean