summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8346014e6093909e3a7c7e0f1a6f7e75c56aefe9 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Jose Riha <jose1711 gmail com>

pkgname=yorg-git
pkgver=v0.11.0_197_gc0d76d5
pkgrel=1
pkgdesc='Free open source and multiplatform racing game (git)'
arch=('i686' 'x86_64')
url="https://github.com/cflavio/yorg"
license=('GPL')
depends=('panda3d' 'bullet' 'gendesk')
install=yorg.install
makedepends=('git')
provides=(yorg)
conflicts=(yorg)
source=($pkgname::"git+https://github.com/cflavio/yorg.git" "yorg")
md5sums=('SKIP'
         '50eb4f1ff961c69e0e0a6b45416def68')

pkgver() {
  cd "${srcdir}/${pkgname}"
  git describe | sed -e 's|-|_|g'
}

prepare() {
  # get/update yracing submodule
  cd "${srcdir}/${pkgname}/yracing"
  git submodule init
  git config submodule.yarcing.url https://github.com/cflavio/yracing.git
  git submodule update

  # get/update yyagl submodule
  cd "${srcdir}/${pkgname}/yyagl"
  git submodule init
  git config submodule.yyagl.url https://github.com/cflavio/yyagl.git
  git submodule update

  # get assets
  cd "${srcdir}/${pkgname}"
  python setup.py lang images models

  # generate a .desktop file
  gendesk -f -n --pkgname yorg --pkgdesc "${pkgdesc}" --exec "yorg" --categories "Game;Simulation"
}

package() {
  cd "${srcdir}/${pkgname}"
  install -dm755 "${pkgdir}/usr/share/games/yorg"
  for i in assets menu yorg yracing yyagl
  do
    cp -r "$i" "${pkgdir}/usr/share/games/yorg"
  done
  install -Dm755 main.py "${pkgdir}/usr/share/games/yorg/main.py"
  install -Dm664 options.json "${pkgdir}/usr/share/games/yorg/options.json"
  install -Dm755 "${srcdir}/yorg" "${pkgdir}/usr/bin/yorg"
  install -Dm644 "yorg.desktop" "${pkgdir}/usr/share/applications/yorg.desktop"
  install -Dm644 "assets/images/icon/icon128_png.png" "${pkgdir}/usr/share/pixmaps/yorg.png"
}