openclaw-1.0.3_20190402.recipe revision 15207855
1SUMMARY="A 2D side-scroller platform video game"
2DESCRIPTION="OpenClaw is a multiplatform C++ reimplementation of original \
3Captain Claw published by Monolith Productions in 1997 about the \
4anthropomorphic pirate cat Captain Nathaniel Joseph Claw, \
5who sets on a quest to find an ancient amulet while fighting \
6enemies and solving puzzles. For this reimplementation \
7the whole codebase was written from scratch. \
8The game uses assets from the original game archive (CLAW.REZ)"
9HOMEPAGE="https://github.com/pjasicek/OpenClaw"
10COPYRIGHT="2009 Peter \"Corsix\" Cawley
11	2012 Michael L. McShaffry and David Graham"
12LICENSE="MIT
13	GNU GPL v3"
14REVISION="2"
15srcGitRev="083aa1971ab66efb204d4e0b7e9c0991f91f3dc3"
16SOURCE_URI="https://github.com/pjasicek/OpenClaw/archive/$srcGitRev.tar.gz"
17CHECKSUM_SHA256="6036c2985ba0aefcf2b5bffc0d941e8fe7d5cbcbe9258c7bcf91e21198825ca0"
18SOURCE_FILENAME="openclaw-$portVersion-$srcGitRev.tar.gz"
19SOURCE_DIR="OpenClaw-$srcGitRev"
20SOURCE_URI_2="https://github.com/pjasicek/OpenClaw/releases/download/v0.0/openclaw_1.0-1.deb#noarchive"
21CHECKSUM_SHA256_2="0e5cde1cb6f3113afb9255f89816f6716d33f03e305ea8a75853d0c5abdd58b1"
22PATCHES="openclaw-$portVersion.patchset"
23ADDITIONAL_FILES="openclaw.rdef.in"
24
25ARCHITECTURES="!x86_gcc2 x86_64"
26SECONDARY_ARCHITECTURES="x86"
27
28GLOBAL_WRITABLE_FILES="
29	settings/OpenClaw/config.xml keep-old
30	settings/OpenClaw/SAVES.XML keep-old
31	"
32
33PROVIDES="
34	openclaw$secondaryArchSuffix = $portVersion
35	app:openclaw = $portVersion
36	"
37REQUIRES="
38	haiku$secondaryArchSuffix
39	lib:libsdl2_2.0$secondaryArchSuffix
40	lib:libsdl2_mixer_2.0$secondaryArchSuffix
41	lib:libsdl2_ttf$secondaryArchSuffix
42	lib:libsdl2_image_2.0$secondaryArchSuffix
43	lib:libsdl2_gfx$secondaryArchSuffix
44	lib:libtinyxml$secondaryArchSuffix
45	"
46
47BUILD_REQUIRES="
48	haiku${secondaryArchSuffix}_devel
49	devel:libsdl2_2.0$secondaryArchSuffix
50	devel:libsdl2_mixer_2.0$secondaryArchSuffix
51	devel:libsdl2_ttf$secondaryArchSuffix
52	devel:libsdl2_image_2.0$secondaryArchSuffix
53	devel:libsdl2_gfx$secondaryArchSuffix
54	devel:libtinyxml$secondaryArchSuffix
55	"
56BUILD_PREREQUIRES="
57	cmd:ar
58	cmd:cmake
59	cmd:g++$secondaryArchSuffix
60	cmd:make
61	cmd:tar
62	cmd:xz
63	"
64
65BUILD()
66{
67	mkdir -p build
68	cd build
69	cmake ..
70	make $jobArgs
71}
72
73INSTALL()
74{
75	mkdir -p $appsDir/OpenClaw/assets
76	cp Build_Release/openclaw $appsDir/OpenClaw/OpenClaw
77
78	cp Build_Release/{clacon.ttf,ASSETS.ZIP,console02.tga} $appsDir/OpenClaw/assets
79
80	mkdir -p $settingsDir/OpenClaw
81	cp Build_Release/{config.xml,SAVES.XML} $settingsDir/OpenClaw
82
83	ar x $sourceDir2/openclaw_1.0-1.deb
84	tar xf data.tar.xz ./usr/share/openclaw/CLAW.REZ
85	mv ./usr/share/openclaw/CLAW.REZ $appsDir/OpenClaw/assets
86
87	local APP_SIGNATURE="application/x-vnd.openclaw"
88	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
89	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
90	local MINOR="`echo "$portVersion" | cut -d. -f3 | cut -d_ -f1`"
91	local LONG_INFO="$SUMMARY"
92	sed \
93		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
94		-e "s|@MAJOR@|$MAJOR|" \
95		-e "s|@MIDDLE@|$MIDDLE|" \
96		-e "s|@MINOR@|$MINOR|" \
97		-e "s|@LONG_INFO@|$LONG_INFO|" \
98		$portDir/additional-files/openclaw.rdef.in > $sourceDir/build/openclaw.rdef
99
100	addResourcesToBinaries  $sourceDir/build/openclaw.rdef $appsDir/OpenClaw/OpenClaw
101
102	addAppDeskbarSymlink $appsDir/OpenClaw/OpenClaw
103}
104