summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1c7c45f3a9e2d6ad32098e696eed0e64dae4acf8 (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
# Maintainer:
# Contributor: Maxime Gauduin <alucryd@archlinux.org>

_pkgname="libretro-nestopia"
pkgname="$_pkgname-git"
pkgver=r109.3dcbec4
pkgrel=1
pkgdesc='Nintendo Entertainment System core'
url='https://github.com/libretro/nestopia'
license=('GPL2')
arch=('i686' 'x86_64')

depends=(
  'libretro-core-info'
)
makedepends=(
  'git'
)

_pkgver="${pkgver#r}"
provides=("$_pkgname=${_pkgver%.*}")
conflicts=("$_pkgname")

_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  printf 'r%s.%s' \
    "$(git rev-list --count HEAD)" \
    "$(git rev-parse --short HEAD)"
}

build() {
  cd "$_pkgsrc/libretro"
  make
}

package() {
  cd "$_pkgsrc/libretro"
  install -Dm644 nestopia_libretro.so -t "${pkgdir:?}/usr/lib/libretro/"
}