summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b2b8c7be3b9cfb793937a32bf13df6c1e1cf744a (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Maintainer: Roland Plüss <roland@dragondreams.ch>
pkgname=('dragengine' 'deigde')
pkgbase=dragengine
pkgver=1.33
pkgrel=1
pkgdesc="Drag[en]gine game engine, launcher and editor"
arch=('x86_64')
url="https://dragondreams.ch/index.php/dragengine"
license=('MIT')
depends=('fftw'
         'fontconfig'
         'freetype2'
         'glibc'
         'gcc-libs'
         'hicolor-icon-theme'
         'hidapi'
         'libavif'
         'libevdev'
         'libglvnd'
         'libjpeg-turbo'
         'libogg'
         'libpng'
         'libtheora'
         'libvorbis'
         'libvpx'
         'libwebp'
         'libx11'
         'libxext'
         'libxfixes'
         'libxft'
         'libxi'
         'libxkbcommon'
         'libxrandr'
         'libxrender'
         'openal'
         'openxr'
         'opus'
         'soundtouch'
         'xdg-utils'
         'zlib')
makedepends=('cmake'
             'gcc'
             'git'
             'glslang'
             'nasm'
             'patchelf'
             'scons')
#_commit='331178e1f330948d5a7b212e6e1551bb61c39033'
#source=("${pkgname}-${pkgver}::git+https://github.com/LordOfDragons/dragengine.git?signed#commit=$_commit"
_tag="v${pkgver}"
source=("${pkgname}-${pkgver}::git+https://github.com/LordOfDragons/dragengine.git#tag=$_tag"
	'custom.py')
sha256sums=('f232b7d58af08593f96d2bac3ba2a4fd8803f4ca1599d4d413ae4216d3e64288'
            '3f30104a28e29ae303786e93dae115d17bea4387badf4cdd05a78e0943d2a046')
# Roland Plüss (roland@dragondreams.ch)
validpgpkeys=("E0ECD22F5F70777588450034446C9C667CFC1DF3")

build() {
	cd "dragengine-$pkgver"
	cp "$srcdir"/custom.py .
	echo "version = '$pkgver'" >>custom.py
	export CFLAGS="${CFLAGS} -fPIC"
	export CXXFLAGS="${CXXFLAGS} -fPIC"
	scons -j 8 build
}

package_dragengine() {
	pkgdesc="Drag[en]gine game engine and launcher"
	provides=('libdragengine.so'
		'libdelauncher.so')
	
	cd "dragengine-$pkgver"
	scons -j 8 --install-sandbox="$(realpath "$pkgdir")" \
		install_engine_runtime \
		delauncher_runtime \
		launcher_console \
		launcher_gui \
		dragengine_develop \
		delauncher_develop
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/dragengine/LICENSE
	
	# fixing manifest files commented out since striping libraries happens
	# after package_* call nullifying any attempt to fix the manifests.
	# instead with_engine_module_checks='no' is used in "custom.py" to
	# disable module checking altogether
	
	#for f in `find "$pkgdir"/usr/lib/dragengine/modules -type f -name "module.xml"`; do
	#	echo "Fix Manifest: $f"
	#	/usr/bin/python3 "$srcdir"/fixManifests.py "$f"
	#done
}

package_deigde() {
	pkgdesc="Drag[en]gine IGDE (Editor)"
	provides=('libdeigdeshared.so')
	depends=('dragengine'
             'glibc'
             'gcc-libs'
	         'xdg-utils'
	         'zlib')
	
	cd "dragengine-$pkgver"
	scons -j 8 --install-sandbox="$(realpath "$pkgdir")" \
		install_igde_runtime \
		deigde_shared_runtime \
		deigde_data \
		deigde_shared_develop
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/deigde/LICENSE
	rm -rf "$pkgdir"/dragengine-import-export
	
	# fixing manifest files commented out since striping libraries happens
	# after package_* call nullifying any attempt to fix the manifests.
	# instead with_engine_module_checks='no' is used in "custom.py" to
	# disable module checking altogether
	
	#for f in `find "$pkgdir"/usr/lib/deigde/modules -type f -name "module.xml"`; do
	#	echo "Fix Manifest: $f"
	#	/usr/bin/python3 "$srcdir"/fixManifests.py "$f"
	#done
}