summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 46c0b9131add9b78864a1e552e9b130bb96556de (plain)
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
# Maintainer: McModder <mcmodder@mcmodder.ru>

pkgname=openttd-git
pkgver=26406.c482f05616
pkgrel=1
pkgdesc='An engine for running Transport Tycoon Deluxe (latest GIT build)'
arch=('i686' 'x86_64')
url='http://openttd.org'
license=('GPL')
depends=('libpng' 'sdl2' 'icu' 'fontconfig' 'lzo' 'hicolor-icon-theme' 'desktop-file-utils' 'xz' 'fluidsynth')
optdepends=('openttd-opengfx: free graphics'
            'openttd-opensfx: free soundset')
makedepends=('git' 'cmake' 'ninja')

source=("$pkgname::git+https://github.com/OpenTTD/OpenTTD.git")
sha256sums=('SKIP')

pkgver() {
  cd ${pkgname}
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cmake -B build \
        -G Ninja \
        -S "${pkgname}" \
        -DBINARY_NAME="${pkgname}" \
        -DCMAKE_INSTALL_BINDIR="bin" \
        -DCMAKE_INSTALL_PREFIX="/usr" \
        -DCMAKE_INSTALL_DATADIR="/usr/share" \
        -DPERSONAL_DIR=".${pkgname}"

  ninja -C build
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
}