]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/extras/install/Makefile.debian
LP 1190279 Modularize Makefile.install
[working/Evergreen.git] / Open-ILS / src / extras / install / Makefile.debian
1 # actions required by all debian-based OSs
2
3 # is this OS-specific?
4 APT_TOOL=aptitude -yq
5
6 install_debs:
7         $(APT_TOOL) install $(DEBS)
8
9 # Install the custom spidermonkey libs and JavaScript-SpiderMonkey Perl modules
10 install_js_sm: install_libjs install_spidermonkey
11
12 install_libjs: 
13         if [ ! -f $(LIBJS).tar.gz ]; then wget $(LIBJS_URL); fi;
14         tar -zxf $(LIBJS).tar.gz
15         cd js/src/ && JS_DIST=/usr make -f Makefile.ref
16         mkdir -p $(JS_INSTALL_PREFIX)/include/js/
17         cp js/src/*.h $(JS_INSTALL_PREFIX)/include/js/
18         cp js/src/*.tbl $(JS_INSTALL_PREFIX)/include/js/
19         cp js/src/Linux_All_DBG.OBJ/*.so $(JS_INSTALL_PREFIX)/lib/
20         cp js/src/Linux_All_DBG.OBJ/*.a $(JS_INSTALL_PREFIX)/lib/
21         ldconfig
22
23
24 install_spidermonkey:
25         if [ ! -f $(LIBJS_PERL).tar.gz ]; then wget $(LIBJS_PERL_URL); fi
26         tar -zxf $(LIBJS_PERL).tar.gz
27         cd $(LIBJS_PERL) && perl Makefile.PL -E4X \
28                 && make && make test && make install
29
30 # On Ubuntu and possibly Debian, the libdbi0 package prevents the 
31 # compiled-from-source version from being used and breaks the install.
32 # This package might get installed depending on the install-time choices
33 # for the distro. Test for its existence; if it's there, throw an error
34 # message and exit.
35 test_for_libdbi_pkg:
36                 @if [ "$$(apt-cache policy libdbi0 | grep Installed | grep none | wc -l)" -eq 0 ]; then \
37                                 echo "*** Detected locally installed libdbi0 package; you must remove this"; \
38                                 echo "*** with a command like 'aptitude remove libdbi0' before proceeding"; \
39                                 echo "*** to successfully install Evergreen."; \
40                                 echo; \
41                                 echo "*** Note: this may break other applications on your system."; \
42                                 exit 0; \
43                 fi;
44
45 debian_sys_config: 
46         # link the apache modules in
47         for m in $(DEB_APACHE_MODS); do a2enmod $$m; done;
48         # keep the bad apache modules away
49         for m in $(DEB_APACHE_DISMODS); do a2dismod $$m; done;
50         # refresh the dynamic library cache
51         ldconfig
52
53 clean:
54         make -f Makefile.ref -C js/src/ clean
55
56
57 # vim:noet:sw=4:ts=4: