1 #---------------------------------------------------------
2 # Makefile.am for xul/staff_client
3 ## Process this file with automake to generate Makefile.in
4 #---------------------------------------------------------
6 export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID)
7 OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript"
8 CHROME_LOCALES = $$(ls -1 chrome/locale)
9 SKIN_CSS = $$(ls -1 server/skin/*css | sed -e "s/.css/_custom.css/")
11 install-exec-local: build
13 build: build_dir chrome2remote localize_manifest generated custom_skins open-ils stamp bundle
14 @echo To test the staff client:
16 @echo " xulrunner application.ini"
19 @echo ' * Creating and populating build/ '
23 @cp -fR defaults build/
24 @cp -fR components build/
25 @cp application.ini build/
26 @cp -fR build/chrome/content/util/ build/server/
27 @cp -fR build/chrome/content/auth/ build/server/
28 @cp build/chrome/content/main/constants.js build/server/main/constants.js
29 @cp build/chrome/content/main/simple_auth.xul build/server/main/simple_auth.xul
30 @cp build/chrome/content/main/bindings.xml build/server/main/bindings.xml
31 @cp build/chrome/content/OpenILS/data.js build/server/OpenILS/data.js
32 @cp build/chrome/content/OpenILS/global_util.js build/server/OpenILS/global_util.js
33 @external/prune_dirs.sh build/
35 # Convert chrome to remote for server localization
37 @sed -i 's/chrome:\/\/open_ils_staff_client\/locale\//\/xul\/server\/locale\/<\!--#echo var=locale-->\//' build/server/main/simple_auth.xul
38 @for loc in $(CHROME_LOCALES); do \
39 cp -fr chrome/locale/$$loc build/server/locale/. ; \
42 # Update the manifest for our installed locales
44 @for loc in $(CHROME_LOCALES) ; do \
45 if [ "$$loc" != "en-US" ]; then ( echo "locale open_ils_staff_client $$loc locale/$$loc/" >> build/chrome/chrome.manifest ) ; fi; \
49 @/bin/date +"%Y%m%d.%H%M%S" > build/BUILD_ID
50 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "Stamping with Build ID: ${STAFF_CLIENT_BUILD_ID}" ; echo ${STAFF_CLIENT_BUILD_ID} > build/BUILD_ID ) ; fi
51 @if [ -z "${STAFF_CLIENT_BUILD_ID}" ]; then ( echo "No Build ID for versioning" ; echo "none" > build/BUILD_ID ) ; fi
52 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^Version=.\*/Version=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
53 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then sed -i s/^BuildID=.\*/BuildID=${STAFF_CLIENT_BUILD_ID}/ build/application.ini ; fi
54 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.css' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
55 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xul' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
56 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.html' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
57 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xhtml' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
58 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.js' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
59 @if [ -n "${STAFF_CLIENT_BUILD_ID}" ]; then find build/ -name '*.xml' -exec sed -i s/xul\\\/server/xul\\\/${STAFF_CLIENT_BUILD_ID}\\\/server/g {} \; ; fi
62 @rm -f build/build.tar
63 @tar cf build.tar build/
67 @echo ' * Grabbing lang.dtd from the OPAC code '
68 @cp @top_srcdir@/Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
71 @echo ' * Grabbing more OPAC code and legacy code and custom code'
72 @cp @top_srcdir@/Open-ILS/web/opac/common/js/*.js build/chrome/content/OpenILS/util/
73 @cp $(OPENSRF_JSLIBS)/*.js build/chrome/content/OpenILS/util/
74 @external/prune_dirs.sh build/
77 @for skin in $(SKIN_CSS); do \
78 if [ ! -f "$$skin" ]; then ( touch build/"$$skin" ); fi \