store/retrieve objects in files
[working/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_FIELDMAPPER=wget -N http://gapines.org/opac/common/js/util/fieldmapper.js
7 RETRIEVE_FM_ALL=wget -N http://gapines.org/opac/common/js/fmall.js
8 RETRIEVE_ORG_TREE=wget -N http://gapines.org/opac/common/js/OrgTree.js
9 RETRIEVE_CLIENT_CONFIG=cp ../../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml .
10
11 all: build package
12         @echo
13         @echo How do makefiles work again?
14         @echo BUILD = ${BUILD}
15         touch application.ini
16
17 #build: generated open-ils patron circ
18 build: generated open-ils custom
19         @echo
20         @echo Everything before packaging
21
22 package: evergreen.xpi
23         @echo
24         @echo Packaging
25
26 stamp: 
27         sed -i s/^Version=.\*/Version=${VERSION}/ application.ini 
28         sed -i s/^BuildID=.\*/BuildID=${BUILD}/ application.ini
29         sed -i s/^Name=.\*/Name=${PACKAGE}/ application.ini 
30         sed -i 's/<em:version>.*<\/em:version>/<em:version>${VERSION}<\/em:version>/' install.rdf 
31         sed -i 's/<em:name>.*<\/em:name>/<em:name>${PACKAGE}<\/em:name>/' install.rdf 
32         sed -i 's/<em:description>.*<\/em:description>/<em:description>${DESCRIPTION}<\/em:description>/' install.rdf 
33         sed -i "s/extVersion: '.\*'/extVersion: '${VERSION}'/" install.js 
34         sed -i "s/extFullName: '.\*'/extFullName: '${DESCRIPTION}'/" install.js 
35         sed -i 's/auth\.title ".*"/auth\.title "${DESCRIPTION}"/' chrome/locale/en-US/evergreen/auth.dtd 
36         sed -i 's/auth\.version ".*"/auth\.version "${PACKAGE} ${VERSION} ${BUILD}"/' chrome/locale/en-US/evergreen/auth.dtd 
37
38 generated:
39         @echo
40         @echo These things are installation specific.  The staff client is the last thing you should try to build.
41         #(cd chrome/content/evergreen/util ; ${RETRIEVE_FIELDMAPPER} );
42         #(cd chrome/content/evergreen/util ; ${RETRIEVE_ORG_TREE} );
43         (cd chrome/content/evergreen/conf ; ${RETRIEVE_CLIENT_CONFIG} );
44         (cd chrome/content/evergreen/OpenILS/util/ ; ${RETRIEVE_FM_ALL} );
45
46 open-ils:
47         cp ../../../OpenSRF/src/javascript/*.js chrome/content/evergreen/OpenSRF/
48         cp ../../../Open-ILS/web/opac/common/js/*.js chrome/content/evergreen/OpenILS/util/
49         #cp ../../../Open-ILS/src/javascript/widgets/*.js chrome/content/evergreen/OpenILS/widgets/
50         #cp ../../../Open-ILS/src/javascript/widgets/menu/*.js chrome/content/evergreen/OpenILS/widgets/menu/
51
52 patron:
53         (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_items/g | sed s/PagedTree/PatronItems/g > chrome/content/evergreen/patron/patron_items_overlay.xul )
54         (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_search_results/g | sed s/PagedTree/PatronSearchResults/g > chrome/content/evergreen/patron/patron_search_results_overlay.xul )
55         (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_checkout_items/g | sed s/PagedTree/PatronCheckoutItems/g > chrome/content/evergreen/patron/patron_checkout_items_overlay.xul )
56         (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_holds/g | sed s/PagedTree/PatronHolds/g > chrome/content/evergreen/patron/patron_holds_overlay.xul )
57         (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_items.dtd)
58         (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_search_results.dtd)
59         (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_checkout_items.dtd)
60         (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_holds.dtd)
61
62 circ:
63         (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/checkin_items/g | sed s/PagedTree/CheckinItems/g > chrome/content/evergreen/circ/checkin_items_overlay.xul )
64         (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/checkin_items.dtd)
65         (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/hold_capture_items/g | sed s/PagedTree/HoldCaptureItems/g > chrome/content/evergreen/circ/hold_capture_items_overlay.xul )
66         (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/hold_capture_items.dtd)
67
68 custom:
69         #(cd chrome/content/evergreen/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
70
71 evergreen.xpi: evergreen.jar
72         @echo
73         @echo make the xpi file
74         zip -r evergreen.xpi chrome/ defaults/ install.js install.rdf application.ini Makefile LICENSE README -x \*CVS\* > /dev/null
75
76 evergreen.jar: build
77         @echo
78         @echo make the jar file
79         (cd chrome; zip -r evergreen.jar content/ locale/ skin/ -x \*CVS\* > /dev/null )
80
81 clean:
82         @echo
83         @echo delete derived files
84         rm -f evergreen.xpi
85         rm -f chrome/evergreen.jar
86         rm -f chrome/content/evergreen/patron/patron_items_overlay.xul chrome/locale/en-US/evergreen/patron_items.dtd
87         rm -f chrome/content/evergreen/patron/patron_search_results_overlay.xul chrome/locale/en-US/evergreen/patron_search_results.dtd
88         rm -f chrome/content/evergreen/patron/patron_checkout_items_overlay.xul chrome/locale/en-US/evergreen/patron_checkout_items.dtd
89         rm -f chrome/content/evergreen/patron/patron_holds_overlay.xul chrome/locale/en-US/evergreen/patron_holds.dtd
90         rm -f chrome/content/evergreen/circ/checkin_items_overlay.xul chrome/locale/en-US/evergreen/checkin_items.dtd
91         rm -f chrome/content/evergreen/circ/hold_capture_items_overlay.xul chrome/locale/en-US/evergreen/hold_capture_items.dtd
92         rm -f chrome/content/evergreen/conf/client_config.xml
93         rm -f chrome/content/evergreen/util/fieldmapper.js
94         rm -f chrome/content/evergreen/util/OrgTree.js
95         rm -f chrome/content/evergreen/OpenSRF/*js
96         rm -f chrome/content/evergreen/OpenILS/util/*js
97         rm -f chrome/content/evergreen/OpenILS/widgets/*js
98         rm -f chrome/content/evergreen/OpenILS/widgets/menu/*js