]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/Makefile
symlinks for server xul
[Evergreen.git] / Open-ILS / xul / staff_client / Makefile
1 VERSION=0.1.0
2 PACKAGE=Evergreen
3 DESCRIPTION=Evergreen Staff Client 
4 BUILD=2005072719
5
6 RETRIEVE_FM_ALL=wget -N http://dev.gapines.org/opac/common/js/fmall.js
7 RETRIEVE_CLIENT_CONFIG=cp ../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml .
8 RETRIEVE_LANG_DTD=cp ../../../../../web/opac/locale/en-US/lang.dtd .
9
10 all: build 
11         @echo
12         @echo How do makefiles work again?
13         @echo BUILD = ${BUILD}
14         touch application.ini
15
16 #build: generated open-ils patron circ
17 build: generated open-ils custom
18         @echo
19         @echo Everything before packaging
20
21 package: open_ils_staff_client.xpi
22         @echo
23         @echo Packaging
24
25 stamp: 
26         sed -i s/^Version=.\*/Version=${VERSION}/ application.ini 
27         sed -i s/^BuildID=.\*/BuildID=${BUILD}/ application.ini
28         sed -i s/^Name=.\*/Name=${PACKAGE}/ application.ini 
29         sed -i 's/<em:version>.*<\/em:version>/<em:version>${VERSION}<\/em:version>/' install.rdf 
30         sed -i 's/<em:name>.*<\/em:name>/<em:name>${PACKAGE}<\/em:name>/' install.rdf 
31         sed -i 's/<em:description>.*<\/em:description>/<em:description>${DESCRIPTION}<\/em:description>/' install.rdf 
32         sed -i "s/extVersion: '.\*'/extVersion: '${VERSION}'/" install.js 
33         sed -i "s/extFullName: '.\*'/extFullName: '${DESCRIPTION}'/" install.js 
34         sed -i 's/auth\.title ".*"/auth\.title "${DESCRIPTION}"/' chrome/locale/en-US/auth.dtd 
35         sed -i 's/auth\.version ".*"/auth\.version "${PACKAGE} ${VERSION} ${BUILD}"/' chrome/locale/en-US/auth.dtd 
36
37 generated:
38         @echo
39         @echo These things are installation specific.  The staff client is the last thing you should try to build.
40         (cd chrome/content/conf ; ${RETRIEVE_CLIENT_CONFIG} );
41         (cd chrome/content/OpenILS/util/ ; ${RETRIEVE_FM_ALL} );
42         (cd chrome/locale/en-US/ ; ${RETRIEVE_LANG_DTD} );
43         external/dtd2js.pl chrome/locale/en-US/lang.dtd > chrome/content/main/lang.js
44
45 symlinks:
46         ln -sf ../chrome/content/util/ server/
47         ln -sf ../../chrome/content/main/constants.js server/main/constants.js
48         ln -sf ../../chrome/content/OpenILS/data.js server/OpenILS/data.js
49
50 open-ils:
51         cp ../../../OpenSRF/src/javascript/*.js chrome/content/OpenSRF/
52         cp ../../../Open-ILS/web/opac/common/js/*.js chrome/content/OpenILS/util/
53         cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* chrome/content/legacy/
54         cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* chrome/content/legacy/
55         cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd chrome/locale/en-US/
56         find chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \;
57
58 patron:
59
60 circ:
61
62 custom:
63         #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
64
65 open_ils_staff_client.xpi: open_ils_staff_client.jar
66         @echo
67         @echo make the xpi file
68         zip -r open_ils_staff_client.xpi chrome/ defaults/ install.js install.rdf application.ini Makefile LICENSE README -x \*CVS\* > /dev/null
69
70 open_ils_staff_client.jar: build
71         @echo
72         @echo make the jar file
73         (cd chrome; zip -r open_ils_staff_client.jar content/ locale/ skin/ -x \*CVS\* > /dev/null )
74
75 clean:
76         @echo
77         @echo delete derived files
78         rm -f open_ils_staff_client.xpi
79         rm -f chrome/open_ils_staff_client.jar
80         rm -f chrome/content/legacy/marc*
81         rm -f chrome/content/legacy/browse*
82         rm -f chrome/locale/en-US/cat.dtd
83         rm -f chrome/content/conf/client_config.xml
84         rm -f chrome/content/OpenSRF/*js
85         rm -f chrome/content/OpenILS/util/*js