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\
105 perl-Cache-Memcached \
107 perl-Class-DBI-AbstractSearch \
108 perl-Class-DBI-SQLite \
109 perl-DateTime-Format-Builder \
110 perl-DateTime-Format-ISO8601 \
111 perl-DateTime-Format-Mail \
115 perl-File-Find-Rule \
123 perl-SQL-Abstract-Limit \
124 perl-Template-Toolkit \
126 perl-Test-Exception \
129 perl-UNIVERSAL-require \
147 libdatetime-format-iso8601-perl \
151 EXTRA_DEBS_SQUEEZE = \
157 EXTRA_DEBS_WHEEZY = \
161 libxml-libxslt-perl \
164 EXTRA_DEBS_UBUNTU_LUCID = \
169 EXTRA_DEBS_UBUNTU_PRECISE = \
172 libxml-libxslt-perl \
175 # ----------------------------------------------------------------------------
178 @echo "please specify an OS" && exit 0
181 debian-wheezy: generic_debian wheezy
182 debian-squeeze: generic_debian squeeze
183 wheezy: install_extra_debs_wheezy
184 squeeze: install_extra_debs_squeeze
185 generic_debian: install_debs debian_sys_config
187 fedora: install_fedora_rpms
189 ubuntu-lucid: generic_ubuntu lucid
190 ubuntu-precise: generic_ubuntu precise
191 lucid: install_extra_debs install_extra_debs_lucid
192 precise: install_extra_debs install_extra_debs_precise
193 generic_ubuntu: install_debs debian_sys_config
195 # ------------------------------------------------------------------
196 # - DEBIAN ---------------------------------------------------------
199 # link the apache modules in
200 for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
202 # adds a placeholder module so apxs will be happy
203 if [ ! "$$(grep mod_placeholder /etc/apache2/httpd.conf)" ]; then \
204 echo -e "#\n#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so" \
205 >> /etc/apache2/httpd.conf; \
208 # Install the debian-specific dependencies
210 $(APT_TOOL) install $(DEBS)
212 # Install the debian-specific dependencies for more modern distros
214 $(APT_TOOL) install $(EXTRA_DEBS)
216 install_extra_debs_wheezy: install_extra_debs
217 $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
219 install_extra_debs_squeeze: install_extra_debs
220 $(APT_TOOL) install $(EXTRA_DEBS_SQUEEZE)
222 # Install even more packaged dependencies on modern distros
223 install_extra_debs_lucid:
224 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_LUCID)
226 install_extra_debs_precise:
227 $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_PRECISE)
231 yum -y install $(FEDORAS)
233 # vim:noet:sw=4:ts=4: