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\
67 libuniversal-require-perl\
106 perl-Cache-Memcached \
108 perl-Class-DBI-AbstractSearch \
109 perl-Class-DBI-SQLite \
110 perl-DateTime-Format-Builder \
111 perl-DateTime-Format-ISO8601 \
112 perl-DateTime-Format-Mail \
116 perl-File-Find-Rule \
125 perl-SQL-Abstract-Limit \
126 perl-Template-Toolkit \
128 perl-Test-Exception \
131 perl-UNIVERSAL-require \
149 libdatetime-format-iso8601-perl \
153 EXTRA_DEBS_SQUEEZE = \
159 EXTRA_DEBS_WHEEZY = \
163 libxml-libxslt-perl \
166 EXTRA_DEBS_UBUNTU_LUCID = \
171 EXTRA_DEBS_UBUNTU_PRECISE = \
174 libxml-libxslt-perl \
177 # ----------------------------------------------------------------------------
180 @echo "please specify an OS" && exit 0
183 debian-wheezy: generic_debian wheezy
184 debian-squeeze: generic_debian squeeze
185 wheezy: install_extra_debs_wheezy
186 squeeze: install_extra_debs_squeeze
187 generic_debian: install_debs debian_sys_config
189 fedora: install_fedora_rpms
191 ubuntu-lucid: generic_ubuntu lucid
192 ubuntu-precise: generic_ubuntu precise
193 lucid: install_extra_debs install_extra_debs_lucid
194 precise: install_extra_debs install_extra_debs_precise
195 generic_ubuntu: install_debs debian_sys_config
197 # ------------------------------------------------------------------
198 # - DEBIAN ---------------------------------------------------------
201 # link the apache modules in
202 for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
204 # adds a placeholder module so apxs will be happy
205 if [ ! "$$(grep mod_placeholder /etc/apache2/httpd.conf)" ]; then \
206 echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
207 >> /etc/apache2/httpd.conf; \
210 # Install the debian-specific dependencies
212 $(APT_TOOL) install $(DEBS)
214 # Install the debian-specific dependencies for more modern distros
216 $(APT_TOOL) install $(EXTRA_DEBS)
218 install_extra_debs_wheezy: install_extra_debs
219 $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
221 install_extra_debs_squeeze: install_extra_debs
222 $(APT_TOOL) install $(EXTRA_DEBS_SQUEEZE)
224 # Install even more packaged dependencies on modern distros
225 install_extra_debs_lucid:
226 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_LUCID)
228 install_extra_debs_precise:
229 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_PRECISE)
233 yum -y install $(FEDORAS)
235 # vim:noet:sw=4:ts=4: