summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b16b1b8c42b637b7ec5b973b0b0615fdf9868d71 (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: Leandro Vital <leavitals at gmail dot com>
pkgname=ludo-git
_pkgname=ludo
pkgver=0.11.0.r4.ga3cc78c
pkgrel=1
pkgdesc="Ludo is a minimalist frontend for emulators"
arch=('x86_64' 'armv7h')
url="https://github.com/libretro/ludo"
license=('GPL3')
makedepends=('make' 'git' 'go')
depends=(
    'glfw'
    'openal'
    'mesa'
)
optdepends=(
    'libretro-beetle-psx'
    'libretro-mgba'
    'libretro-genesis-plus-gx'
    'libretro-snes9x'
    'libretro-gambatte'
    'libretro-picodrive'
    'libretro-yabause'
    'libretro-nestopia'
)
source=(
    "git+https://github.com/libretro/ludo.git#branch=master"
    "ludo.toml"
    "ludo.desktop"
)

md5sums=("SKIP" "SKIP" "SKIP")

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/$_pkgname"
  git submodule update --init --recursive
}

build() {
    export GOPATH="$srcdir"/gopath
    cd "$srcdir/$_pkgname"
    make
}

package() {
  install -Dm644 "ludo.toml" "$pkgdir/etc/ludo.toml"
  install -Dm644 "ludo.desktop" "$pkgdir/usr/share/applications/ludo.desktop"
  install -Dm755 "$srcdir/ludo/assets/icon.svg" "$pkgdir/usr/share/pixmaps/ludo.svg"

  install -dm755 "$pkgdir/usr/share/ludo"
  install -Dm755 "$srcdir/ludo/ludo" "$pkgdir/usr/bin/ludo" 

  cp -R "$srcdir/ludo/assets/" "$pkgdir/usr/share/ludo/assets"
  cp -R "$srcdir/ludo/database/" "$pkgdir/usr/share/ludo/database"
  chmod -R 0755 "$pkgdir/usr/share/ludo"
}