aboutsummaryrefslogtreecommitdiffstats
path: root/testing/fheroes2/APKBUILD
blob: eba2cf704114bccd836d10b686239e4b290cbdd6 (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
# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer: Grigory Kirillov <txgk@bk.ru>
pkgname=fheroes2
pkgver=0.9.18
pkgrel=1
pkgdesc="Recreation of HoMM2 game engine"
url="https://github.com/ihhub/fheroes2"
arch="all"
license="GPL-2.0-only"
options="!check" # no test suite
makedepends="
	gettext
	gnu-libiconv
	sed
	sdl2-dev
	sdl2_image-dev
	sdl2_mixer-dev
	zlib-dev
	"
subpackages="$pkgname-lang"
source="https://github.com/ihhub/fheroes2/archive/$pkgver/fheroes2-$pkgver.tar.gz"
install="$pkgname.post-install"
langdir="/usr/share/$pkgname/files/lang"

[ "$CARCH" = "riscv64" ] && options="$options textrels"

build() {
	make FHEROES2_WITH_IMAGE=1 FHEROES2_DATA=/usr/share/fheroes2

	# Use GNU iconv instead of musl-based one, because this project uses
	# TRANSLIT iconv extension which is not present in musl implementation.
	sed -i s/iconv/gnu-iconv/g files/lang/Makefile

	make -C files/lang
}

package() {
	install -Dm755 src/dist/fheroes2 -t "$pkgdir"/usr/bin/
	install -Dm644 script/packaging/common/fheroes2.desktop -t "$pkgdir"/usr/share/applications/
	install -Dm644 files/data/*.h2d -t "$pkgdir"/usr/share/"$pkgname"/files/data/
	install -Dm644 files/lang/*.mo -t "$pkgdir"/usr/share/"$pkgname"/files/lang/
	install -Dm755 script/demo/download_demo_version.sh -t "$pkgdir"/usr/share/"$pkgname"/
	install -Dm755 script/homm2/extract_homm2_resources.sh -t "$pkgdir"/usr/share/"$pkgname"/
	install -Dm644 src/resources/fheroes2.png -t "$pkgdir"/usr/share/pixmaps/
	install -dm755 "$pkgdir"/usr/share/fheroes2/data
	install -dm755 "$pkgdir"/usr/share/fheroes2/maps
}

sha512sums="
3f435b578a89b079c2ccd63006b03c0f0f19255eae19ad8f0fb3bb11cf7e978f9557c1cd5f0ea4c77fbce2c2a328e646dec62ad6424ca36c1c89ce8b23621628  fheroes2-0.9.18.tar.gz
"