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 (wheezy/squeeze), Ubuntu (lucid/precise)
10 # Installs Perl prereqs, libjs with Perl wrapper
13 # make -f Makefile.install debian-wheezy
15 # make -f Makefile.install debian-squeeze
17 # make -f Makefile.install ubuntu-lucid
19 # make -f Makefile.install ubuntu-precise
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\
66 libuniversal-require-perl\
110 perl-Cache-Memcached \
112 perl-Class-DBI-AbstractSearch \
113 perl-Class-DBI-SQLite \
114 perl-DateTime-Format-Builder \
115 perl-DateTime-Format-ISO8601 \
116 perl-DateTime-Format-Mail \
120 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_SQUEEZE = \
162 EXTRA_DEBS_WHEEZY = \
166 libxml-libxslt-perl \
169 EXTRA_DEBS_UBUNTU_LUCID = \
174 EXTRA_DEBS_UBUNTU_PRECISE = \
177 libxml-libxslt-perl \
180 # ----------------------------------------------------------------------------
183 @echo "please specify an OS" && exit 0
186 debian-wheezy: generic_debian wheezy
187 debian-squeeze: generic_debian squeeze
188 wheezy: install_extra_debs_wheezy
189 squeeze: install_extra_debs_squeeze
190 generic_debian: install_debs debian_sys_config
192 fedora: install_fedora_rpms
194 ubuntu-lucid: generic_ubuntu lucid
195 ubuntu-precise: generic_ubuntu precise
196 lucid: install_extra_debs install_extra_debs_lucid
197 precise: install_extra_debs install_extra_debs_precise
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_wheezy: install_extra_debs
222 $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
224 install_extra_debs_squeeze: install_extra_debs
225 $(APT_TOOL) install $(EXTRA_DEBS_SQUEEZE)
227 # Install even more packaged dependencies on modern distros
228 install_extra_debs_lucid:
229 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_LUCID)
231 install_extra_debs_precise:
232 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_PRECISE)
236 yum -y install $(FEDORAS)
238 # vim:noet:sw=4:ts=4: