summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fa0c8ba9150501b9fc9273b9c8316479b4147793 (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
58
59
60
61
# Maintainer: Julian Xhokaxhiu <info at julianxhokaxhiu dot com>
pkgname=ludo
pkgver=0.11.2
pkgrel=1
pkgdesc="Ludo is a minimalist frontend for emulators"
arch=('x86_64' 'armv7h')
url="https://github.com/libretro/ludo"
license=('GPL3')
makedepends=(
  'go'
  'git'
  'wget'
)
depends=(
  'glfw'
  'openal'
  'mesa'
)
source=(
  "git+https://github.com/libretro/ludo"
  "ludo.json"
  "ludo.desktop"
)
sha256sums=(
  'SKIP'
  '89e860320694d3bec02942bb81af01a8553d5f49c4c50a2cbf377d6252b481a5'
  '139eedd5dd868717b46032cd9773bc63b692237c37e6da4450357a3f56a18042'
)

prepare() {
  cd "${srcdir}/ludo"
  git checkout v${pkgver}
  git submodule update --init --recursive
}

package() {
  _ARCH=""

  if [ $arch == "armv7h" ]; then
    _ARCH="arm"
  else
    _ARCH="$arch"
  fi

  install -Dm644 "ludo.json" "$pkgdir/etc/ludo.json"
  install -Dm644 "ludo.desktop" "$pkgdir/usr/share/applications/ludo.desktop"

  cd "${srcdir}/ludo"

  ARCH="${_ARCH}" OS="Linux" make tar

  install -Dm755 "ludo" "$pkgdir/usr/bin/ludo"
  install -Dm755 "assets/icon.svg" "$pkgdir/usr/share/pixmaps/ludo.svg"
  install -dm755 "$pkgdir/usr/share/ludo"
  cp -R "assets/" "$pkgdir/usr/share/ludo/assets"
  cp -R "cores/" "$pkgdir/usr/share/ludo/cores"
  cp -R "database/" "$pkgdir/usr/share/ludo/database"
  chmod -R 0755 "$pkgdir/usr/share/ludo"

  make clean
}