]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/extras/Makefile.install
f717448fcc5837a4d18e75da7d414758ca9e4e5c
[OpenSRF.git] / src / extras / Makefile.install
1 # ---------------------------------------------------------------------
2 # Author: Bill Erickson <erickson@esilibrary.com>
3 # Author: Dan Scott <dscott@laurentian.ca>
4 #
5 # Makefile to install prerequisites for OpenSRF
6 #
7 # Currently supports Debian (wheezy/squeeze), Ubuntu (lucid/precise)
8 # and Fedora (16).
9 #
10 # Installs Perl prereqs, libjs with Perl wrapper
11 #
12 # usage:
13 #       make -f Makefile.install debian-wheezy
14 #       - or -
15 #       make -f Makefile.install debian-squeeze
16 #       - or -
17 #       make -f Makefile.install ubuntu-lucid
18 #       - or -
19 #       make -f Makefile.install ubuntu-precise
20 #       - or -
21 #       make -f Makefile.install fedora
22 #
23 # ---------------------------------------------------------------------
24
25 # Make any assumptions about the shell being used explicit
26 SHELL=/bin/bash 
27
28 # 64 or 32 bit os?
29 LBITS=$(shell getconf LONG_BIT)
30
31 APT_TOOL=apt-get -yq
32
33 # Debian dependencies
34 DEBS =  \
35         apache2-mpm-prefork\
36         apache2-prefork-dev\
37         autoconf\
38         automake\
39         build-essential\
40         check\
41         ejabberd\
42         less\
43         libapache2-mod-perl2\
44         libcache-memcached-perl\
45         libclass-dbi-abstractsearch-perl\
46         libclass-dbi-sqlite-perl\
47         libdatetime-format-builder-perl\
48         libdatetime-format-mail-perl\
49         libdatetime-perl\
50         libdatetime-timezone-perl\
51         liberror-perl\
52         libexpat1-dev\
53         libfile-find-rule-perl\
54         libgcrypt11-dev \
55         libgdbm-dev \
56         liblog-log4perl-perl\
57         libmodule-build-perl\
58         libnet-dns-perl\
59         libnet-jabber-perl\
60         libperl-dev\
61         libreadline-dev\
62         libtemplate-perl\
63         libtest-pod-perl\
64         libtie-ixhash-perl\
65         libtool\
66         libuniversal-require-perl\
67         libunix-syslog-perl\
68         libwww-perl\
69         libxml2-dev\
70         libxml-libxml-perl\
71         libxml-libxslt-perl\
72         libxml-simple-perl\
73         libxslt1-dev\
74         memcached\
75         pkg-config\
76         python-coverage\
77         psmisc\
78         python-dev\
79         python-libxml2\
80         python-memcache\
81         python-nose\
82         python-pyxmpp\
83         python-setuptools\
84         python-simplejson\
85         tar\
86         zlib1g-dev
87
88 FEDORAS = \
89         autoconf \
90         automake \
91         check \
92         check-devel \
93         ejabberd \
94         expat-devel \
95         gcc \
96         gdbm-devel \
97         httpd \
98         httpd-devel \
99         less \
100         libgcrypt-devel \
101         libmemcached \
102         libmemcached-devel \
103         libtool \
104         libxml2-devel \
105         libxml2-python \
106         libxslt-devel \
107         make \
108         memcached \
109         mod_perl \
110         perl-Cache-Memcached \
111         perl-Class-DBI \
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 \
117         perl-DateTime-Set \
118         perl-devel \
119         perl-Error \
120         perl-File-Find-Rule \
121         perl-JSON-XS \
122         perl-libwww-perl \
123         perl-Log-Log4perl \
124         perl-Module-Build \
125         perl-Net-DNS \
126         perl-Net-Jabber \
127         perl-Net-Server \
128         perl-SQL-Abstract-Limit \
129         perl-Template-Toolkit \
130         perl-Test-Deep \
131         perl-Test-Exception \
132         perl-Test-Pod \
133         perl-Tie-IxHash \
134         perl-UNIVERSAL-require \
135         perl-Unix-Syslog \
136         perl-XML-LibXML \
137         perl-XML-LibXSLT \
138         perl-XML-Simple \
139         psmisc \
140         python-devel \
141         python-dns \
142         python-memcached \
143         python-setuptools \
144         python-simplejson \
145         readline-devel \
146         tar
147
148 DEB_APACHE_MODS = \
149         ssl
150
151 EXTRA_DEBS = \
152         libdatetime-format-iso8601-perl \
153         libjson-xs-perl \
154         libnet-server-perl
155
156 EXTRA_DEBS_SQUEEZE = \
157         libmemcached-dev \
158         libmemcached-tools \
159         libxml-libxml-perl \
160         libxml-libxslt-perl
161
162 EXTRA_DEBS_WHEEZY = \
163         libmemcached-dev \
164         libmemcached-tools \
165         libxml-libxml-perl \
166         libxml-libxslt-perl \
167         libncurses5-dev
168
169 EXTRA_DEBS_UBUNTU_LUCID = \
170         libmemcached-dev\
171         libxml-libxml-perl \
172         libxml-libxslt-perl
173
174 EXTRA_DEBS_UBUNTU_PRECISE = \
175         libmemcached-dev\
176         libxml-libxml-perl \
177         libxml-libxslt-perl \
178         ncurses-dev
179
180 # ----------------------------------------------------------------------------
181
182 all: 
183         @echo "please specify an OS" && exit 0
184
185
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
191
192 fedora: install_fedora_rpms
193
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
199
200 # ------------------------------------------------------------------
201 # - DEBIAN ---------------------------------------------------------
202
203 debian_sys_config: 
204         # link the apache modules in
205         for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
206
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; \
211         fi;
212
213 # Install the debian-specific dependencies
214 install_debs:
215         $(APT_TOOL) install $(DEBS)
216
217 # Install the debian-specific dependencies for more modern distros
218 install_extra_debs:
219         $(APT_TOOL) install $(EXTRA_DEBS)
220
221 install_extra_debs_wheezy: install_extra_debs
222         $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
223
224 install_extra_debs_squeeze: install_extra_debs
225         $(APT_TOOL) install $(EXTRA_DEBS_SQUEEZE)
226
227 # Install even more packaged dependencies on modern distros
228 install_extra_debs_lucid:
229         $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_LUCID)
230
231 install_extra_debs_precise:
232         $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_PRECISE)
233
234 # Fedora
235 install_fedora_rpms:
236         yum -y install $(FEDORAS)
237
238 # vim:noet:sw=4:ts=4: