#
# Makefile to install prerequisites for OpenSRF
#
-# Currently supports Debian (jessie/wheezy), Ubuntu (precise/trusty)
-# and Fedora (16).
+# Currently supports Debian (jessie/stretch) and Ubuntu
+# (xenial/bionic)
#
# Installs Perl prereqs, libjs with Perl wrapper
#
# usage:
-# make -f Makefile.install debian-jessie
-# - or -
-# make -f Makefile.install debian-wheezy
+# make -f Makefile.install debian-stretch
# - or -
-# make -f Makefile.install ubuntu-precise
+# make -f Makefile.install debian-jessie
# - or -
-# make -f Makefile.install ubuntu-trusty
+# make -f Makefile.install ubuntu-xenial
+# - or -
+# make -f Makefile.install ubuntu-bionic
# - or -
# make -f Makefile.install fedora
#
python-setuptools\
python-simplejson\
tar\
+ unzip\
+ zip\
zlib1g-dev
FEDORAS = \
libjson-xs-perl \
libnet-server-perl
-EXTRA_DEBS_WHEEZY = \
- apache2-mpm-prefork \
- apache2-prefork-dev \
- libncurses5-dev
-
EXTRA_DEBS_JESSIE = \
apache2-mpm-prefork \
apache2-prefork-dev \
libncurses5-dev
-EXTRA_DEBS_UBUNTU_PRECISE = \
- apache2-mpm-prefork \
- apache2-prefork-dev \
- ncurses-dev
-
-EXTRA_DEBS_UBUNTU_TRUSTY = \
- apache2-mpm-prefork \
- apache2-prefork-dev \
- ncurses-dev
+EXTRA_DEBS_DEBIAN_STRETCH = \
+ apache2 \
+ apache2-dev \
+ libncurses5-dev
EXTRA_DEBS_UBUNTU_XENIAL = \
apache2 \
apache2-dev \
libncurses5-dev
+EXTRA_DEBS_UBUNTU_BIONIC = \
+ apache2 \
+ apache2-dev \
+ libncurses5-dev
+
# ----------------------------------------------------------------------------
all:
@echo "please specify an OS" && exit 0
-debian-jessie: generic_debian jessie
-debian-wheezy: generic_debian wheezy
-jessie: install_extra_debs_jessie apache_mpm_prefork_mods
-wheezy: install_extra_debs_wheezy
-generic_debian: install_debs debian_sys_config
+debian-stretch: generic_debian stretch apache_mpm_prefork_mods apache_perl_mod
+debian-jessie: generic_debian jessie apache_mpm_prefork_mods
+stretch: install_extra_debs install_extra_debs_stretch debian_sys_config
+jessie: install_extra_debs_jessie debian_sys_config
+generic_debian: install_debs
fedora: install_fedora_rpms
-ubuntu-precise: generic_ubuntu precise
-ubuntu-trusty: generic_ubuntu trusty apache_mpm_prefork_mods
-ubuntu-xenial: generic_ubuntu xenial apache_mpm_prefork_mods
-precise: install_extra_debs install_extra_debs_precise debian_sys_config
-trusty: install_extra_debs install_extra_debs_trusty debian_sys_config
+ubuntu-xenial: generic_ubuntu xenial apache_mpm_prefork_mods apache_perl_mod
+ubuntu-bionic: generic_ubuntu bionic apache_mpm_prefork_mods apache_perl_mod
xenial: install_extra_debs install_extra_debs_xenial debian_sys_config
+bionic: install_extra_debs install_extra_debs_bionic debian_sys_config
generic_ubuntu: install_debs
# ------------------------------------------------------------------
# link the apache modules in
for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
- # adds a placeholder module so apxs will be happy
- if [ ! "$$(grep mod_placeholder /etc/apache2/httpd.conf)" ]; then \
- echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
- >> /etc/apache2/httpd.conf; \
- fi;
-
# Install the debian-specific dependencies
install_debs:
$(APT_TOOL) install $(DEBS)
install_extra_debs:
$(APT_TOOL) install $(EXTRA_DEBS)
+install_extra_debs_stretch:
+ $(APT_TOOL) install $(EXTRA_DEBS_DEBIAN_STRETCH)
+
install_extra_debs_jessie: install_extra_debs
$(APT_TOOL) install $(EXTRA_DEBS_JESSIE)
-install_extra_debs_wheezy: install_extra_debs
- $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
-
# Install even more packaged dependencies on modern distros
-install_extra_debs_precise:
- $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_PRECISE)
-
-install_extra_debs_trusty:
- $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_TRUSTY)
-
install_extra_debs_xenial:
$(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_XENIAL)
+install_extra_debs_bionic:
+ $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_BIONIC)
+
+
# Some OSes activate the Apache mpm_event module by default.
# OpenSRF requires prefork.
apache_mpm_prefork_mods:
a2dismod mpm_event
a2enmod mpm_prefork
+# Need to activate mod_perl on some O/S.
+apache_perl_mod:
+ a2enmod perl
+
# Fedora
install_fedora_rpms:
yum -y install $(FEDORAS)