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)
44 libcache-memcached-perl\
45 libclass-dbi-abstractsearch-perl\
46 libclass-dbi-sqlite-perl\
47 libdatetime-format-builder-perl\
48 libdatetime-format-mail-perl\
50 libdatetime-timezone-perl\
53 libfile-find-rule-perl\
65 libuniversal-require-perl\
109 perl-Cache-Memcached \
111 perl-Class-DBI-AbstractSearch \
112 perl-Class-DBI-SQLite \
113 perl-DateTime-Format-Builder \
114 perl-DateTime-Format-ISO8601 \
115 perl-DateTime-Format-Mail \
119 perl-File-Find-Rule \
126 perl-SQL-Abstract-Limit \
127 perl-Template-Toolkit \
129 perl-Test-Exception \
132 perl-UNIVERSAL-require \
150 libdatetime-format-iso8601-perl \
154 EXTRA_DEBS_WHEEZY = \
158 libxml-libxslt-perl \
161 EXTRA_DEBS_JESSIE = \
165 libxml-libxslt-perl \
168 EXTRA_DEBS_UBUNTU_PRECISE = \
171 libxml-libxslt-perl \
174 EXTRA_DEBS_UBUNTU_TRUSTY = \
177 libxml-libxslt-perl \
180 # ----------------------------------------------------------------------------
183 @echo "please specify an OS" && exit 0
186 debian-jessie: generic_debian jessie
187 debian-wheezy: generic_debian wheezy
188 jessie: install_extra_debs_jessie apache_mpm_prefork_mods
189 wheezy: install_extra_debs_wheezy
190 generic_debian: install_debs debian_sys_config
192 fedora: install_fedora_rpms
194 ubuntu-precise: generic_ubuntu precise
195 ubuntu-trusty: generic_ubuntu trusty apache_mpm_prefork_mods
196 precise: install_extra_debs install_extra_debs_precise
197 trusty: install_extra_debs install_extra_debs_trusty
198 generic_ubuntu: install_debs debian_sys_config
200 # ------------------------------------------------------------------
201 # - DEBIAN ---------------------------------------------------------
204 # link the apache modules in
205 for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
207 # adds a placeholder module so apxs will be happy
208 if [ ! "$$(grep mod_placeholder /etc/apache2/httpd.conf)" ]; then \
209 echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
210 >> /etc/apache2/httpd.conf; \
213 # Install the debian-specific dependencies
215 $(APT_TOOL) install $(DEBS)
217 # Install the debian-specific dependencies for more modern distros
219 $(APT_TOOL) install $(EXTRA_DEBS)
221 install_extra_debs_jessie: install_extra_debs
222 $(APT_TOOL) install $(EXTRA_DEBS_JESSIE)
224 install_extra_debs_wheezy: install_extra_debs
225 $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
227 # Install even more packaged dependencies on modern distros
228 install_extra_debs_precise:
229 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_PRECISE)
231 install_extra_debs_trusty:
232 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_TRUSTY)
234 # Some OSes activate the Apache mpm_event module by default.
235 # OpenSRF requires prefork.
236 apache_mpm_prefork_mods:
242 yum -y install $(FEDORAS)
244 # vim:noet:sw=4:ts=4: