desktop/corsix-th/PKGBUILD
2015-12-05 15:10:39 +01:00

48 lines
1.7 KiB
Bash

pkgname=corsix-th
_pkgname=CorsixTH
pkgver=0.50
_pkgver=$pkgver
pkgrel=1
pkgdesc='Reimplementation of the game engine of Theme Hospital.'
arch=('x86_64')
url='https://github.com/CorsixTH/CorsixTH'
license=('MIT')
depends=('ffmpeg' 'lua' 'sdl2_mixer' 'timidity++' 'x264')
categories=('games')
makedepends=('cmake')
install=$pkgname.install
source=("https://github.com/CorsixTH/CorsixTH/archive/v${pkgver}.tar.gz"
$pkgname-fix-parameters-to-sws_scale.patch::"https://github.com/CorsixTH/CorsixTH/commit/4ae56e100911c1763cb9fd9a4b8647e323ecc032.patch"
"$pkgname.sh")
sha256sums=('822cb5b4a4ec863ba410b6a37e456b360516b2362337532689070e4555c037ee'
'65161006dfc0aaff77d0beffd3894203ca2f304d0db71f54329859fa08c712ab'
'3614197a30498774fff4055ee54d82a812a8b88eba353b70c3288a09ff700158')
prepare() {
# fix location in .desktop entry
cp -up CorsixTH-$pkgver/DebianPackage/usr/share/applications/CorsixTH.desktop $pkgname.desktop
sed 's/games/share/g' -i $pkgname.desktop
# fix crash in ffmpeg 2.8+
# patch -d CorsixTH-$pkgver -Np1 < $pkgname-fix-parameters-to-sws_scale.patch
}
build() {
cd CorsixTH-$pkgver
cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev \
-DLUA_PROGRAM_PATH=/usr/bin/lua -DLUA_INCLUDE_DIR=/usr/include -DLUA_LIBRARY=/usr/lib/liblua.so \
-DCMAKE_INSTALL_PREFIX=/usr/share/ .
cd CorsixTH
make
}
package() {
make -C CorsixTH-$pkgver/CorsixTH DESTDIR="$pkgdir/" install
# launcher
install -Dm0755 $pkgname.sh "$pkgdir"/usr/bin/CorsixTH
# license
install -Dm0644 CorsixTH-$pkgver/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
# .desktop integration
install -Dm0644 $pkgname.desktop "$pkgdir"/usr/share/applications/CorsixTH.desktop
}