aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openttd/APKBUILD
blob: b75d57abb41ea7546281d088c7b4628b2fe8e899 (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
# Contributor: Adrian Siekierka <kontakt@asie.pl>
# Maintainer:
pkgname=openttd
pkgver=1.10.3
pkgrel=1
pkgdesc="Open source version of the Transport Tycoon Deluxe simulator"
url="https://www.openttd.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="fontconfig-dev freetype-dev icu-dev libpng-dev lzo-dev
	sdl2-dev xz-dev zlib-dev"
checkdepends="openttd-opengfx"
subpackages="$pkgname-doc $pkgname-lang::noarch"
source="https://cdn.openttd.org/openttd-releases/$pkgver/openttd-$pkgver-source.tar.xz"

build() {
	# OpenTTD's builtin strip does not work when cross-compiling,
	# but it will be done automatically later in the package build.
	./configure \
		--build="$CBUILD" \
		--host="$CHOST" \
		--disable-strip \
		--prefix-dir=/usr \
		--binary-dir=bin \
		--install-dir="$pkgdir" \
		--with-sdl \
		--with-zlib \
		--with-liblzma \
		--with-liblzo2 \
		--with-freetype \
		--with-fontconfig \
		--without-icu
	make
}

check() {
	make test
}

package() {
	make install
}

lang() {
	pkgdesc="$pkgdesc (localizations)"

	cd "$pkgdir"
	mkdir -p "$subpkgdir"/usr/share/games/openttd/lang
	find usr/share/games/openttd/lang/ ! -name 'english.lng' -type f \
		-exec mv {} "$subpkgdir"/{} \;
}

sha512sums="d1cd535e8e49f0ac147704341287af1b16bde6725fd9152dd36dcb780559b400da8bb31c4e8eb665a0d11e9b1f5bf8a96be0f97f7a85bd967eec534fdd3dd0d4  openttd-1.10.3-source.tar.xz"