aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/openpandora/op-bundle.mk
blob: fe107ee2d4e08f8b76e9d1bfbb41265d8bb8968d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Special target to create bundles and PND's for the OpenPandora.

#bundle_name = release/scummvm-op-`date '+%Y-%m-%d'`
bundle_name = release/scummvm-op
f=$(shell which $(STRIP))
libloc = $(shell dirname $(f))

op-bundle: $(EXECUTABLE)
	$(MKDIR) "$(bundle_name)"
	$(MKDIR) "$(bundle_name)/scummvm"
	$(MKDIR) "$(bundle_name)/scummvm/bin"
	$(MKDIR) "$(bundle_name)/scummvm/data"
	$(MKDIR) "$(bundle_name)/scummvm/docs"
	$(MKDIR) "$(bundle_name)/scummvm/icon"
	$(MKDIR) "$(bundle_name)/scummvm/lib"

	$(CP) $(srcdir)/dists/openpandora/runscummvm.sh $(bundle_name)/scummvm/
	$(CP) $(srcdir)/dists/openpandora/PXML.xml $(bundle_name)/scummvm/data/

	$(CP) $(srcdir)/dists/openpandora/icon/scummvm.png $(bundle_name)/scummvm/icon/
	$(CP) $(srcdir)/dists/openpandora/icon/preview-pic.png  $(bundle_name)/scummvm/icon/


	$(CP) $(srcdir)/dists/openpandora/README-OPENPANDORA $(bundle_name)/scummvm/docs/
	$(CP) $(srcdir)/dists/openpandora/index.html $(bundle_name)/scummvm/docs/

	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/docs/

	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/data/
ifdef DIST_FILES_ENGINEDATA
	$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/data/
endif
ifdef DIST_FILES_NETWORKING
	$(INSTALL) -c -m 644 $(DIST_FILES_NETWORKING) $(bundle_name)/scummvm/data/
endif
ifdef DIST_FILES_VKEYBD
	$(INSTALL) -c -m 644 $(DIST_FILES_VKEYBD) $(bundle_name)/scummvm/data/
endif

	$(STRIP) $(EXECUTABLE) -o $(bundle_name)/scummvm/bin/$(EXECUTABLE)

ifdef DYNAMIC_MODULES
	$(INSTALL) -d "$(bundle_name)/scummvm/plugins"
	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
	$(STRIP) $(bundle_name)/scummvm/plugins/*
endif

	$(CP) $(libloc)/../arm-angstrom-linux-gnueabi/usr/lib/libFLAC.so.8.2.0 $(bundle_name)/scummvm/lib/libFLAC.so.8
	tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
	rm -R ./$(bundle_name)

op-pnd: $(EXECUTABLE)
	$(MKDIR) "$(bundle_name)"
	$(MKDIR) "$(bundle_name)/scummvm"
	$(MKDIR) "$(bundle_name)/scummvm/bin"
	$(MKDIR) "$(bundle_name)/scummvm/data"
	$(MKDIR) "$(bundle_name)/scummvm/docs"
	$(MKDIR) "$(bundle_name)/scummvm/icon"
	$(MKDIR) "$(bundle_name)/scummvm/lib"

	$(CP) $(srcdir)/dists/openpandora/runscummvm.sh $(bundle_name)/scummvm/
	$(CP) $(srcdir)/dists/openpandora/PXML.xml $(bundle_name)/scummvm/data/

	$(CP) $(srcdir)/dists/openpandora/icon/scummvm.png $(bundle_name)/scummvm/icon/
	$(CP) $(srcdir)/dists/openpandora/icon/preview-pic.png  $(bundle_name)/scummvm/icon/


	$(CP) $(srcdir)/dists/openpandora/README-OPENPANDORA $(bundle_name)/scummvm/docs/
	$(CP) $(srcdir)/dists/openpandora/index.html $(bundle_name)/scummvm/docs/

	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/docs/

	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/data/
ifdef DIST_FILES_ENGINEDATA
	$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/data/
endif
ifdef DIST_FILES_NETWORKING
	$(INSTALL) -c -m 644 $(DIST_FILES_NETWORKING) $(bundle_name)/scummvm/data/
endif
ifdef DIST_FILES_VKEYBD
	$(INSTALL) -c -m 644 $(DIST_FILES_VKEYBD) $(bundle_name)/scummvm/data/
endif

	$(STRIP) $(EXECUTABLE) -o $(bundle_name)/scummvm/bin/$(EXECUTABLE)

ifdef DYNAMIC_MODULES
	$(INSTALL) -d "$(bundle_name)/scummvm/plugins"
	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
	$(STRIP) $(bundle_name)/scummvm/plugins/*
endif

	$(CP) $(libloc)/../arm-angstrom-linux-gnueabi/usr/lib/libFLAC.so.8.2.0 $(bundle_name)/scummvm/lib/libFLAC.so.8

	$(srcdir)/dists/openpandora/pnd_make.sh -p $(bundle_name).pnd -c -d $(bundle_name)/scummvm -x $(bundle_name)/scummvm/data/PXML.xml -i $(bundle_name)/scummvm/icon/scummvm.png

	$(CP) $(srcdir)/dists/openpandora/README-PND.txt $(bundle_name)

	tar -cvjf $(bundle_name)-pnd.tar.bz2 $(bundle_name).pnd $(bundle_name)/README-PND.txt
	rm -R ./$(bundle_name)

.PHONY: op-bundle op-pnd