summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 48a5ee658fb7c242c9503dad7178d496d36f437f (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: spider-mario <spidermario@free.fr>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>

pkgname=vbam-git
pkgver=2.1.0.r2.g459a1fbe
pkgrel=1
epoch=1
pkgdesc='Nintendo Game Boy Advance emulator'
arch=('i686' 'x86_64')
url='https://github.com/visualboyadvance-m/visualboyadvance-m'
license=('GPL2')
depends=('wxgtk3' 'sfml' 'ffmpeg' 'zip')
makedepends=('git' 'cmake' 'gettext')
makedepends_i686=('nasm')
conflicts=('vbam-gtk' 'vbam-wx')
provides=('vbam-wx')
options=('!emptydirs')
source=('vbam::git+https://github.com/visualboyadvance-m/visualboyadvance-m.git')
sha256sums=('SKIP')

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

prepare() {
  cd vbam

  rm -rf build
  mkdir build
}

build() {
  cd vbam/build

  _cmakeargs=(-DCMAKE_INSTALL_PREFIX='/usr'
              -DCMAKE_SKIP_RPATH='TRUE'
              -DENABLE_FFMPEG='TRUE')

  if [[ "$CARCH" == i686 ]]; then
    _cmakeargs+=(-DENABLE_ASM_CORE='TRUE'
                 -DENABLE_ASM_SCALERS='TRUE')
  fi

  cmake .. "${_cmakeargs[@]}"
  make
}

package() {
  cd vbam/build

  make DESTDIR="$pkgdir"/ install
  install -m 755 visualboyadvance-m "${pkgdir}"/usr/bin/
}

# vim: ts=2 sw=2 et: