1 # ---------------------------------------------------------------------
2 # Author: Bill Erickson <erickson@esilibrary.com>
3 # Author: Dan Scott <dscott@laurentian.ca>
5 # Makefile to install prerequisites for OpenSRF
7 # Currently supports Debian (jessie/stretch), Ubuntu (trusty/xenial)
10 # Installs Perl prereqs, libjs with Perl wrapper
13 # make -f Makefile.install debian-stretch
15 # make -f Makefile.install debian-jessie
17 # make -f Makefile.install ubuntu-trusty
19 # make -f Makefile.install ubuntu-xenial
21 # make -f Makefile.install fedora
23 # ---------------------------------------------------------------------
25 # Make any assumptions about the shell being used explicit
29 LBITS=$(shell getconf LONG_BIT)
42 libcache-memcached-perl\
43 libclass-dbi-abstractsearch-perl\
44 libclass-dbi-sqlite-perl\
45 libdatetime-format-builder-perl\
46 libdatetime-format-mail-perl\
48 libdatetime-timezone-perl\
51 libfile-find-rule-perl\
65 libuniversal-require-perl\
106 libxml-libxslt-perl \
113 perl-Cache-Memcached \
115 perl-Class-DBI-AbstractSearch \
116 perl-Class-DBI-SQLite \
117 perl-DateTime-Format-Builder \
118 perl-DateTime-Format-ISO8601 \
119 perl-DateTime-Format-Mail \
123 perl-File-Find-Rule \
130 perl-SQL-Abstract-Limit \
131 perl-Template-Toolkit \
133 perl-Test-Exception \
136 perl-UNIVERSAL-require \
154 libdatetime-format-iso8601-perl \
158 EXTRA_DEBS_JESSIE = \
159 apache2-mpm-prefork \
160 apache2-prefork-dev \
163 EXTRA_DEBS_DEBIAN_STRETCH = \
168 EXTRA_DEBS_UBUNTU_TRUSTY = \
169 apache2-mpm-prefork \
170 apache2-prefork-dev \
173 EXTRA_DEBS_UBUNTU_XENIAL = \
178 # ----------------------------------------------------------------------------
181 @echo "please specify an OS" && exit 0
184 debian-stretch: generic_debian stretch apache_mpm_prefork_mods apache_perl_mod
185 debian-jessie: generic_debian jessie apache_mpm_prefork_mods
186 stretch: install_extra_debs install_extra_debs_stretch debian_sys_config
187 jessie: install_extra_debs_jessie debian_sys_config
188 generic_debian: install_debs
190 fedora: install_fedora_rpms
192 ubuntu-trusty: generic_ubuntu trusty apache_mpm_prefork_mods
193 ubuntu-xenial: generic_ubuntu xenial apache_mpm_prefork_mods apache_perl_mod
194 trusty: install_extra_debs install_extra_debs_trusty debian_sys_config
195 xenial: install_extra_debs install_extra_debs_xenial debian_sys_config
196 generic_ubuntu: install_debs
198 # ------------------------------------------------------------------
199 # - DEBIAN ---------------------------------------------------------
202 # link the apache modules in
203 for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
205 # Install the debian-specific dependencies
207 $(APT_TOOL) install $(DEBS)
209 # Install the debian-specific dependencies for more modern distros
211 $(APT_TOOL) install $(EXTRA_DEBS)
213 install_extra_debs_stretch:
214 $(APT_TOOL) install $(EXTRA_DEBS_DEBIAN_STRETCH)
216 install_extra_debs_jessie: install_extra_debs
217 $(APT_TOOL) install $(EXTRA_DEBS_JESSIE)
219 # Install even more packaged dependencies on modern distros
220 install_extra_debs_trusty:
221 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_TRUSTY)
223 install_extra_debs_xenial:
224 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_XENIAL)
226 # Some OSes activate the Apache mpm_event module by default.
227 # OpenSRF requires prefork.
228 apache_mpm_prefork_mods:
232 # Need to activate mod_perl on some O/S.
238 yum -y install $(FEDORAS)
240 # vim:noet:sw=4:ts=4: