# Contributor: Adrian Siekierka # Maintainer: Adrian Siekierka pkgname=openttd pkgver=1.6.1 pkgrel=0 pkgdesc="Open source simulation game based upon Transport Tycoon Deluxe" url="http://openttd.org/" arch="all" license="GPL2" depends="" makedepends="libpng-dev zlib-dev sdl-dev lzo-dev xz-dev freetype-dev fontconfig-dev" subpackages="$pkgname-doc $pkgname-lang::noarch" source="https://binaries.openttd.org/releases/1.6.1/openttd-1.6.1-source.tar.xz" builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" # 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 \ || return 1 make || return 1 } package() { cd "$builddir" make install || return 1 } lang() { pkgdesc="$pkgdesc (localizations)" cd "$pkgdir" mkdir -p "$subpkgdir"/usr/share/games/openttd/lang local i for i in $(find usr/share/games/openttd/lang/ ! -name 'english.lng' -type f); do mv "$i" "$subpkgdir"/"$i" || return 1 done } md5sums="420c0488d2b085a1879ae2325e558310 openttd-1.6.1-source.tar.xz" sha256sums="9b08996e31c3485ef8dedfa1ab65147091593f3f11bd51eb7662ce5ea41363aa openttd-1.6.1-source.tar.xz" sha512sums="e0677c311e6567d130c1affc13c11fd81a742b588ee77e062a8f5816063b3da62fc2bc54eca4f243268266254358b06d9fea05f997468a33f201065e4ef4691a openttd-1.6.1-source.tar.xz"