initial merge/overlay profile editor ui
[working/Evergreen.git] / Open-ILS / web / Makefile.am
1 #---------------------------------------------------------
2 # Makefile.am for web
3 ## Process this file with automake to generate Makefile.in
4 #---------------------------------------------------------
5
6 webdir = $(WEBDIR)
7 opacjsdir = $(DESTDIR)$(WEBDIR)/opac/common/js
8 jsdojodir = $(DESTDIR)$(WEBDIR)/js/dojo
9 jsdojoosrfdir = $(DESTDIR)$(WEBDIR)/js/dojo/opensrf
10 opacextrasdir = $(DESTDIR)$(WEBDIR)/opac/extras/xsl/
11 reportsdir = $(DESTDIR)$(WEBDIR)/reports/
12
13 if BUILDILSWEB
14 OILSWEB_INST = webcore-install offline-install cgi-bootstrap
15
16 #webcore-install
17
18 reports_SCRIPTS = @top_srcdir@/Open-ILS/xul/staff_client/server/admin/adminlib.js
19 OPACJS = $(OPENSRF_LIBS)/javascript/DojoSRF.js \
20          $(OPENSRF_LIBS)/javascript/JSON_v0.js \
21          $(OPENSRF_LIBS)/javascript/JSON_v1.js \
22          $(OPENSRF_LIBS)/javascript/md5.js \
23          $(OPENSRF_LIBS)/javascript/opensrf.js \
24          $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
25          $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js \
26          @top_srcdir@/Open-ILS/xul/staff_client/chrome//content//util/date.js
27 JSDOJO = $(OPENSRF_LIBS)/javascript/DojoSRF.js
28 JSDOJOSRF = $(OPENSRF_LIBS)/javascript/md5.js \
29              $(OPENSRF_LIBS)/javascript/JSON_v1.js \
30              $(OPENSRF_LIBS)/javascript/opensrf.js \
31              $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
32              $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js
33 endif
34
35 install-exec-local: webcore-install offline-install cgi-bootstrap
36
37 uninstall-hook:
38         rm -R $(opacextrasdir)
39         rm -R $(webdir)
40
41 webcore-install:
42         $(MKDIR_P) $(DESTDIR)$(WEBDIR)
43         $(MKDIR_P) $(DESTDIR)$(WEBDIR)/opac/extras/slimpac/
44         $(MKDIR_P) $(DESTDIR)$(WEBDIR)/standalone/
45         $(MKDIR_P) $(opacextrasdir)
46         $(MKDIR_P) $(DESTDIR)$(reportsdir)
47         $(MKDIR_P) $(DESTDIR)$(XSLDIR)
48         rm -f $(DESTDIR)$(reportsdir)/fm_IDL.xml
49         cp $(DESTDIR)@sysconfdir@/fm_IDL.xml $(DESTDIR)$(WEBDIR)/reports/
50         cp -r @top_srcdir@/Open-ILS/web/. $(DESTDIR)$(WEBDIR)
51         cp @top_srcdir@/Open-ILS/xsl/*.xsl $(opacextrasdir)
52         cp @top_srcdir@/Open-ILS/xsl/*.xsl $(DESTDIR)$(XSLDIR)
53         cp -r $(DESTDIR)$(WEBDIR)/opac/skin/default/* $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/
54         cp -r @top_srcdir@/Open-ILS/web/opac/skin/craftsman/* $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/
55         for i in mresult.xml rresult.xml rdetail.xml advanced.xml myopac.xml cnbrowse.xml; do \
56                 cd $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/ && rm -f $$i && $(LN_S) index.xml $$i; \
57         done
58         for i in mresult.xml rresult.xml rdetail.xml advanced.xml myopac.xml cnbrowse.xml; do \
59                  cd $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/ && rm -f $$i && $(LN_S) index.xml $$i; \
60         done
61
62 offline-install:
63         @echo "Installing offline CGIs to $(CGIDIR)/offline";
64         $(MKDIR_P) $(TMP)
65         $(MKDIR_P) $(DESTDIR)$(CGIDIR)/offline;
66         $(MKDIR_P) $(datadir)/offline;
67         perl -pe "s{##CONFIG##}{@sysconfdir@}" < @top_srcdir@/Open-ILS/src/offline/offline.pl > $(TMP)/offline.pl;
68         cp $(TMP)/offline.pl $(DESTDIR)$(CGIDIR)/offline/
69         chmod +x $(DESTDIR)$(CGIDIR)/offline/offline.pl
70
71 cgi-bootstrap:
72         @echo "Installing cgi's to $(DESTDIR)$(CGIDIR)"
73         $(MKDIR_P) $(TMP)/cgi-bin
74         $(MKDIR_P) $(DESTDIR)$(CGIDIR)
75         for i in @top_srcdir@/Open-ILS/src/cgi-bin/*cgi; do xxx=`basename $$i`; perl -pe "s{##CONFIG##}{@sysconfdir@}" < $$i > $(TMP)/cgi-bin/$$xxx; done
76         cp $(TMP)/cgi-bin/*cgi $(DESTDIR)$(CGIDIR)
77         cp -r @top_srcdir@/Open-ILS/src/cgi-bin/support $(DESTDIR)$(CGIDIR)
78         chmod 755 $(DESTDIR)$(CGIDIR)/*cgi
79
80 install-data-local:
81         $(MKDIR_P) $(DESTDIR)$(WEBDIR)/opac/common/js
82         for i in $(OPACJS); do \
83                 cd $(DESTDIR)$(WEBDIR)/opac/common/js && \
84                 rm -f `basename $$i` && $(LN_S) $$i . ; \
85         done
86         $(MKDIR_P) $(DESTDIR)$(WEBDIR)/js/dojo/opensrf
87         for i in $(JSDOJOSRF); do \
88                 cd $(DESTDIR)$(WEBDIR)/js/dojo/opensrf && \
89                 rm -f `basename $$i` && $(LN_S) $$i . ; \
90         done
91         for i in $(JSDOJO); do \
92                 cd $(DESTDIR)$(WEBDIR)/js/dojo && \
93                 rm -f `basename $$i` && $(LN_S) $$i . ; \
94         done