aboutsummaryrefslogtreecommitdiffstats
path: root/community/widelands/APKBUILD
blob: 9907614047e59f2f1795092f12fae26b9d8dce02 (plain) (blame)
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
# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=widelands
pkgver=1.0
pkgrel=0
pkgdesc="realtime strategy game with emphasis on economy and transport"
url="https://widelands.org"
arch="all"
license="GPL-2.0-or-later"
depends="lua python3"
makedepends="
	boost-dev
	cmake
	curl-dev
	dbus-dev
	doxygen
	freeglut-dev
	gettext-dev
	glew-dev
	graphviz
	libexecinfo-dev
	libintl
	libpng-dev
	ninja
	sdl2-dev
	sdl2_image-dev
	sdl2_mixer-dev
	sdl2_net-dev
	sdl2_ttf-dev
	zlib-dev
"
source="https://github.com/widelands/widelands/archive/v$pkgver/widelands-v$pkgver.tar.gz
	widelands.desktop
	widelands.png
	0001-link-libintl.patch
	0002-linux-only-enable-backtrace-when-using-glibc.patch
	0003-cmake-add-support-for-None-build-type.patch
	"
subpackages="$pkgname-doc"

build() {
	cmake -B output \
		-Wno-dev \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DWL_INSTALL_BASEDIR=/usr \
		-DWL_INSTALL_DATADIR=/usr/share/widelands \
		-G Ninja
	cmake --build output
}

check() {
	cd output
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install output

	mkdir -p "$pkgdir"/usr/bin
	for _exe in widelands wl_create_spritesheet wl_map_object_info wl_map_info; do
		mv "$pkgdir/usr/$_exe" "$pkgdir"/usr/bin/
	done

	mkdir -p "$pkgdir"/usr/share/doc/"$pkgname"
	for _file in VERSION ChangeLog CREDITS; do
		mv "$pkgdir/usr/$_file" "$pkgdir"/usr/share/doc/"$pkgname"
	done

	mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
	mv "$pkgdir"/usr/COPYING "$pkgdir"/usr/share/licenses/"$pkgname"

	install -Dm644 "$srcdir"/$pkgname.png "$pkgdir"/usr/share/pixmaps/$pkgname.png
	install -Dm644 "$srcdir"/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
}
sha512sums="
1092750944a8669682097dfbd2b578cdb8fab377f32cb81ce8d85b9d9b2e8ae8c4c73500c0a89be649b360fd7e086e19595eba37cecb8d64679e46f7da13e46e  widelands-v1.0.tar.gz
9100b2430ee195f17e80e6096c89450792bc97d235b4c3fd596f6bef6d08ea6cbd5d722d8dbc48280663808a8ed56c496681581e195e443208f819c2919ba102  widelands.desktop
f7db9d7584ec8431f2f1857baddeb32cd3ae182343e7f0369e61fb444514bd9c2e6a3931ae34f24cc994840dffbbe4451f33845798f3d582f41b31f451b261ac  widelands.png
645bae9804dab9a372176b070797c51a6720cb7372e786b3eab868fada63c7b7ddf6815b687886267d13cfe90c0ecf7516e44b3f5c921a0024c1a30e0fb87344  0001-link-libintl.patch
f0ead2f77191621c5b46c90884f5b1495f8d4ff8cbf2acfc31e2f9586f3358a96ce3eea410f9ed9f8017b12ee856f5224b77a7b1f12e8cf1c04a044b57f1c6c3  0002-linux-only-enable-backtrace-when-using-glibc.patch
4950c303231e675d85ec304858ce59f8c383ac9e38ec7df11444941421585479a21596fc23dd374c22386255014957a27e5e7508c67f00dedde147a8e2bf4e1a  0003-cmake-add-support-for-None-build-type.patch
"