# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=catcodec
pkgver=1.0.5
pkgrel=0
pkgdesc="Decodes and encodes sample catalogues for OpenTTD"
url="http://www.openttd.org/en/download-catcodec"
arch="all"
license="GPL-2.0"
depends=""
depends_dev=""
makedepends=""
install=""
subpackages="$pkgname-doc"
source="http://binaries.openttd.org/extra/$pkgname/$pkgver/$pkgname-$pkgver-source.tar.xz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make VERBOSE=1
}

package() {
	cd "$builddir"

	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm644 docs/$pkgname.1 \
		"$pkgdir"/usr/share/man/man1/$pkgname.1

	mkdir -p "$pkgdir"/usr/share/docs/$pkgname/
	install -m644 changelog.txt docs/readme.txt \
		"$pkgdir"/usr/share/docs/$pkgname/
}

sha512sums="e6e17da17f2449ff5d3a18c34ba3125d475a481ef1dc73ba03dac32fc8523a8929d2cbdfda5f647a0226aa007a217fc90c85ec4cc46937f75e15a596277e0db5  catcodec-1.0.5-source.tar.xz"
