]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/extras/Makefile.install
LP#1690206 - remove check of httpd.conf from OpenSRF Makefile.install
[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 (jessie/wheezy), Ubuntu (trusty/xenial)
8 # and Fedora (16).
9 #
10 # Installs Perl prereqs, libjs with Perl wrapper
11 #
12 # usage:
13 #       make -f Makefile.install debian-jessie
14 #       - or -
15 #       make -f Makefile.install debian-wheezy
16 #       - or -
17 #       make -f Makefile.install ubuntu-trusty
18 #       - or -
19 #       make -f Makefile.install ubuntu-xenial
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         autoconf\
36         automake\
37         build-essential\
38         check\
39         ejabberd\
40         less\
41         libapache2-mod-perl2\
42         libcache-memcached-perl\
43         libclass-dbi-abstractsearch-perl\
44         libclass-dbi-sqlite-perl\
45         libdatetime-format-builder-perl\
46         libdatetime-format-mail-perl\
47         libdatetime-perl\
48         libdatetime-timezone-perl\
49         liberror-perl\
50         libexpat1-dev\
51         libfile-find-rule-perl\
52         libgcrypt11-dev \
53         libgdbm-dev \
54         liblog-log4perl-perl\
55         libmemcached-dev \
56         libmemcached-tools \
57         libmodule-build-perl\
58         libnet-dns-perl\
59         libperl-dev\
60         libreadline-dev\
61         libtemplate-perl\
62         libtest-pod-perl\
63         libtie-ixhash-perl\
64         libtool\
65         libuniversal-require-perl\
66         libunix-syslog-perl\
67         libwww-perl\
68         libxml2-dev\
69         libxml-libxml-perl\
70         libxml-libxslt-perl\
71         libxml-simple-perl\
72         libxslt1-dev\
73         memcached\
74         pkg-config\
75         python-coverage\
76         psmisc\
77         python-dev\
78         python-libxml2\
79         python-memcache\
80         python-nose\
81         python-pyxmpp\
82         python-setuptools\
83         python-simplejson\
84         tar\
85         zlib1g-dev
86
87 FEDORAS = \
88         autoconf \
89         automake \
90         check \
91         check-devel \
92         ejabberd \
93         expat-devel \
94         gcc \
95         gdbm-devel \
96         httpd \
97         httpd-devel \
98         less \
99         libgcrypt-devel \
100         libmemcached \
101         libmemcached-devel \
102         libtool \
103         libxml-libxml-perl \
104         libxml-libxslt-perl \
105         libxml2-devel \
106         libxml2-python \
107         libxslt-devel \
108         make \
109         memcached \
110         mod_perl \
111         perl-Cache-Memcached \
112         perl-Class-DBI \
113         perl-Class-DBI-AbstractSearch \
114         perl-Class-DBI-SQLite \
115         perl-DateTime-Format-Builder \
116         perl-DateTime-Format-ISO8601 \
117         perl-DateTime-Format-Mail \
118         perl-DateTime-Set \
119         perl-devel \
120         perl-Error \
121         perl-File-Find-Rule \
122         perl-JSON-XS \
123         perl-libwww-perl \
124         perl-Log-Log4perl \
125         perl-Module-Build \
126         perl-Net-DNS \
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_WHEEZY = \
157         apache2-mpm-prefork \
158         apache2-prefork-dev \
159         libncurses5-dev
160
161 EXTRA_DEBS_JESSIE = \
162         apache2-mpm-prefork \
163         apache2-prefork-dev \
164         libncurses5-dev
165
166 EXTRA_DEBS_UBUNTU_TRUSTY = \
167         apache2-mpm-prefork \
168         apache2-prefork-dev \
169         ncurses-dev
170
171 EXTRA_DEBS_UBUNTU_XENIAL = \
172         apache2 \
173         apache2-dev \
174         libncurses5-dev
175
176 # ----------------------------------------------------------------------------
177
178 all: 
179         @echo "please specify an OS" && exit 0
180
181
182 debian-jessie: generic_debian jessie apache_mpm_prefork_mods
183 debian-wheezy: generic_debian wheezy
184 jessie: install_extra_debs_jessie debian_sys_config
185 wheezy: install_extra_debs_wheezy debian_sys_config
186 generic_debian: install_debs
187
188 fedora: install_fedora_rpms
189
190 ubuntu-trusty: generic_ubuntu trusty apache_mpm_prefork_mods
191 ubuntu-xenial: generic_ubuntu xenial apache_mpm_prefork_mods apache_perl_mod
192 trusty: install_extra_debs install_extra_debs_trusty debian_sys_config
193 xenial: install_extra_debs install_extra_debs_xenial debian_sys_config
194 generic_ubuntu: install_debs
195
196 # ------------------------------------------------------------------
197 # - DEBIAN ---------------------------------------------------------
198
199 debian_sys_config: 
200         # link the apache modules in
201         for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
202
203 # Install the debian-specific dependencies
204 install_debs:
205         $(APT_TOOL) install $(DEBS)
206
207 # Install the debian-specific dependencies for more modern distros
208 install_extra_debs:
209         $(APT_TOOL) install $(EXTRA_DEBS)
210
211 install_extra_debs_jessie: install_extra_debs
212         $(APT_TOOL) install $(EXTRA_DEBS_JESSIE)
213
214 install_extra_debs_wheezy: install_extra_debs
215         $(APT_TOOL) install $(EXTRA_DEBS_WHEEZY)
216
217 # Install even more packaged dependencies on modern distros
218 install_extra_debs_trusty:
219         $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_TRUSTY)
220
221 install_extra_debs_xenial:
222         $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_XENIAL)
223
224 # Some OSes activate the Apache mpm_event module by default.
225 # OpenSRF requires prefork.
226 apache_mpm_prefork_mods:
227         a2dismod mpm_event
228         a2enmod mpm_prefork
229
230 # Need to activate mod_perl on some O/S.
231 apache_perl_mod:
232         a2enmod perl
233
234 # Fedora
235 install_fedora_rpms:
236         yum -y install $(FEDORAS)
237
238 # vim:noet:sw=4:ts=4: