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