# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=opengfx
pkgver=0.5.5
pkgrel=0
pkgdesc="Graphics files for OpenTTD"
url="https://www.openttd.org/en/"
arch="noarch"
options="!check"  # Requires GIMP
license="GPL-2.0-only"
depends=""
makedepends="grfcodec nml"
subpackages=""
source="https://binaries.openttd.org/extra/opengfx/$pkgver/$pkgname-$pkgver-source.tar.xz
	Makefile.patch
	"
builddir="$srcdir/$pkgname-$pkgver-source"

build() {
	cd "$builddir"
	make GIMP="" _V="" bundle_tar
}

package() {
	cd "$builddir"
	local _file
	for _file in *.grf opengfx.obg; do
		install -D -m644 -g games $_file \
			"$pkgdir"/usr/share/games/openttd/data/$_file
	done
}

sha512sums="952fb52e19bd790e335a9df0f11fa29b2fc570b49903419904956cc65883adde93d432160b16682366ab8b973b7852d2d30f574f1840f6fbd082e1addbe5bfe8  opengfx-0.5.5-source.tar.xz
a337ab4ade493a87d2687a7aa2fb05dcd5718725645950486975a6df309dd1e6631d4b04fa6dcbf590e869b45b037caa32468ea6f677ce458d61950f77c5a006  Makefile.patch"