]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/extras/Makefile.install
Lp 1808580: Remove Installation Support for Ubuntu 14.04
[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/stretch) and Ubuntu
8 # (xenial/bionic)
9 #
10 # Installs Perl prereqs, libjs with Perl wrapper
11 #
12 # usage:
13 #       make -f Makefile.install debian-stretch
14 #       - or -
15 #       make -f Makefile.install debian-jessie
16 #       - or -
17 #       make -f Makefile.install ubuntu-xenial
18 #   - or -
19 #   make -f Makefile.install ubuntu-bionic
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         unzip\
86         zip\
87         zlib1g-dev
88
89 FEDORAS = \
90         autoconf \
91         automake \
92         check \
93         check-devel \
94         ejabberd \
95         expat-devel \
96         gcc \
97         gdbm-devel \
98         httpd \
99         httpd-devel \
100         less \
101         libgcrypt-devel \
102         libmemcached \
103         libmemcached-devel \
104         libtool \
105         libxml-libxml-perl \
106         libxml-libxslt-perl \
107         libxml2-devel \
108         libxml2-python \
109         libxslt-devel \
110         make \
111         memcached \
112         mod_perl \
113         perl-Cache-Memcached \
114         perl-Class-DBI \
115         perl-Class-DBI-AbstractSearch \
116         perl-Class-DBI-SQLite \
117         perl-DateTime-Format-Builder \
118         perl-DateTime-Format-ISO8601 \
119         perl-DateTime-Format-Mail \
120         perl-DateTime-Set \
121         perl-devel \
122         perl-Error \
123         perl-File-Find-Rule \
124         perl-JSON-XS \
125         perl-libwww-perl \
126         perl-Log-Log4perl \
127         perl-Module-Build \
128         perl-Net-DNS \
129         perl-Net-Server \
130         perl-SQL-Abstract-Limit \
131         perl-Template-Toolkit \
132         perl-Test-Deep \
133         perl-Test-Exception \
134         perl-Test-Pod \
135         perl-Tie-IxHash \
136         perl-UNIVERSAL-require \
137         perl-Unix-Syslog \
138         perl-XML-LibXML \
139         perl-XML-LibXSLT \
140         perl-XML-Simple \
141         psmisc \
142         python-devel \
143         python-dns \
144         python-memcached \
145         python-setuptools \
146         python-simplejson \
147         readline-devel \
148         tar
149
150 DEB_APACHE_MODS = \
151         ssl
152
153 EXTRA_DEBS = \
154         libdatetime-format-iso8601-perl \
155         libjson-xs-perl \
156         libnet-server-perl
157
158 EXTRA_DEBS_JESSIE = \
159         apache2-mpm-prefork \
160         apache2-prefork-dev \
161         libncurses5-dev
162
163 EXTRA_DEBS_DEBIAN_STRETCH = \
164         apache2 \
165         apache2-dev \
166         libncurses5-dev
167
168 EXTRA_DEBS_UBUNTU_XENIAL = \
169         apache2 \
170         apache2-dev \
171         libncurses5-dev
172
173 EXTRA_DEBS_UBUNTU_BIONIC = \
174         apache2 \
175         apache2-dev \
176         libncurses5-dev
177
178 # ----------------------------------------------------------------------------
179
180 all: 
181         @echo "please specify an OS" && exit 0
182
183
184 debian-stretch: generic_debian stretch apache_mpm_prefork_mods apache_perl_mod
185 debian-jessie: generic_debian jessie apache_mpm_prefork_mods
186 stretch: install_extra_debs install_extra_debs_stretch debian_sys_config
187 jessie: install_extra_debs_jessie debian_sys_config
188 generic_debian: install_debs
189
190 fedora: install_fedora_rpms
191
192 ubuntu-xenial: generic_ubuntu xenial apache_mpm_prefork_mods apache_perl_mod
193 ubuntu-bionic: generic_ubuntu bionic apache_mpm_prefork_mods apache_perl_mod
194 xenial: install_extra_debs install_extra_debs_xenial debian_sys_config
195 bionic: install_extra_debs install_extra_debs_bionic debian_sys_config
196 generic_ubuntu: install_debs
197
198 # ------------------------------------------------------------------
199 # - DEBIAN ---------------------------------------------------------
200
201 debian_sys_config: 
202         # link the apache modules in
203         for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
204
205 # Install the debian-specific dependencies
206 install_debs:
207         $(APT_TOOL) install $(DEBS)
208
209 # Install the debian-specific dependencies for more modern distros
210 install_extra_debs:
211         $(APT_TOOL) install $(EXTRA_DEBS)
212
213 install_extra_debs_stretch:
214         $(APT_TOOL) install $(EXTRA_DEBS_DEBIAN_STRETCH)
215
216 install_extra_debs_jessie: install_extra_debs
217         $(APT_TOOL) install $(EXTRA_DEBS_JESSIE)
218
219 # Install even more packaged dependencies on modern distros
220 install_extra_debs_xenial:
221         $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_XENIAL)
222
223 install_extra_debs_bionic:
224         $(APT_TOOL) install $(EXTRA_DEBS_UBUNTU_BIONIC)
225
226
227 # Some OSes activate the Apache mpm_event module by default.
228 # OpenSRF requires prefork.
229 apache_mpm_prefork_mods:
230         a2dismod mpm_event
231         a2enmod mpm_prefork
232
233 # Need to activate mod_perl on some O/S.
234 apache_perl_mod:
235         a2enmod perl
236
237 # Fedora
238 install_fedora_rpms:
239         yum -y install $(FEDORAS)
240
241 # vim:noet:sw=4:ts=4: