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/wheezy), Ubuntu (precise/trusty)
10 # Installs Perl prereqs, libjs with Perl wrapper
13 # make -f Makefile.install debian-jessie
15 # make -f Makefile.install debian-wheezy
17 # make -f Makefile.install ubuntu-precise
19 # make -f Makefile.install ubuntu-trusty
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\
104 libxml-libxslt-perl \
111 perl-Cache-Memcached \
113 perl-Class-DBI-AbstractSearch \
114 perl-Class-DBI-SQLite \
115 perl-DateTime-Format-Builder \
116 perl-DateTime-Format-ISO8601 \
117 perl-DateTime-Format-Mail \
121 perl-File-Find-Rule \
128 perl-SQL-Abstract-Limit \
129 perl-Template-Toolkit \
131 perl-Test-Exception \
134 perl-UNIVERSAL-require \
152 libdatetime-format-iso8601-perl \
156 EXTRA_DEBS_WHEEZY = \
157 apache2-mpm-prefork \
158 apache2-prefork-dev \
161 EXTRA_DEBS_JESSIE = \
162 apache2-mpm-prefork \
163 apache2-prefork-dev \
166 EXTRA_DEBS_UBUNTU_PRECISE = \
167 apache2-mpm-prefork \
168 apache2-prefork-dev \
171 EXTRA_DEBS_UBUNTU_TRUSTY = \
172 apache2-mpm-prefork \
173 apache2-prefork-dev \
176 EXTRA_DEBS_UBUNTU_XENIAL = \
179 # ----------------------------------------------------------------------------
182 @echo "please specify an OS" && exit 0
185 debian-jessie: generic_debian jessie
186 debian-wheezy: generic_debian wheezy
187 jessie: install_extra_debs_jessie apache_mpm_prefork_mods
188 wheezy: install_extra_debs_wheezy
189 generic_debian: install_debs debian_sys_config
191 fedora: install_fedora_rpms
193 ubuntu-precise: generic_ubuntu precise
194 ubuntu-trusty: generic_ubuntu trusty apache_mpm_prefork_mods
195 ubuntu-xenial: generic_ubuntu xenial apache_mpm_prefork_mods
196 precise: install_extra_debs install_extra_debs_precise
197 trusty: install_extra_debs install_extra_debs_trusty
198 xenial: install_extra_debs
199 generic_ubuntu: install_debs debian_sys_config
201 # ------------------------------------------------------------------
202 # - DEBIAN ---------------------------------------------------------
205 # link the apache modules in
206 for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
208 # adds a placeholder module so apxs will be happy
209 if [ ! "$$(grep mod_placeholder /etc/apache2/httpd.conf)" ]; then \
210 echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
211 >> /etc/apache2/httpd.conf; \
214 # Install the debian-specific dependencies
216 $(APT_TOOL) install $(DEBS)
218 # Install the debian-specific dependencies for more modern distros
220 $(APT_TOOL) install $(EXTRA_DEBS)
222 install_extra_debs_jessie: install_extra_debs
223 $(APT_TOOL) install $(EXTRA_DEBS_JESSIE)
225 install_extra_debs_wheezy: install_extra_debs
226 $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
228 # Install even more packaged dependencies on modern distros
229 install_extra_debs_precise:
230 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_PRECISE)
232 install_extra_debs_trusty:
233 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_TRUSTY)
235 # Some OSes activate the Apache mpm_event module by default.
236 # OpenSRF requires prefork.
237 apache_mpm_prefork_mods:
243 yum -y install $(FEDORAS)
245 # vim:noet:sw=4:ts=4: