summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b5b6900a53566b88e8c011c3f6396484b89466e3 (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
# Maintainer: Vaporeon <vaporeon@vaporeon.io>

pkgname=bsnes-classic-git
pkgver=0.73r83.038e2e0
pkgrel=1
pkgdesc='SNES emulator with Qt GUI and debugger'
arch=('i686' 'x86_64')
url='https://github.com/awjackson/bsnes-classic'
license=('GPL3')
depends=('libao' 'libpulse' 'openal' 'qt4' 'sdl' 'zenity')
makedepends=('mesa' 'git')
source=("git+${url}.git"
        'bsnes')
sha256sums=('SKIP'
            'a51e0c313e1f809aaa2f5cc8c63bd050618053db83a23e76c1a0c5e3d213c2b7')
conflicts=('bsnes-classic' 'bsnes-plus')
provides=('bsnes-classic')

pkgver() {
  cd bsnes-classic
  printf "0.73r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  export qtpath=/usr/lib/qt4/

  cd "${srcdir}"/bsnes-classic/bsnes

  for p in {accuracy,compatibility,performance}; do
    make profile="$p"
    mv out/bsnes{,-$p}
    make clean
  done

  for l in {snesfilter,snesreader,supergameboy}; do
    cd "${srcdir}"/bsnes-classic/"$l"
    make
  done
}

package() {
  cd "${srcdir}"/bsnes-classic/
  install -dm 755 "${pkgdir}"/usr/{bin,lib,share/{applications,pixmaps}}
  install -m 755 ../bsnes "${pkgdir}"/usr/bin/
  install -m 644 bsnes/data/bsnes.desktop "${pkgdir}"/usr/share/applications/
  install -m 644 bsnes/data/bsnes.png "${pkgdir}"/usr/share/pixmaps/
  install -m 644 snesfilter/libsnesfilter.so "${pkgdir}"/usr/lib/
  install -m 644 snesreader/libsnesreader.so "${pkgdir}"/usr/lib/
  install -m 644 supergameboy/libsupergameboy.so "${pkgdir}"/usr/lib/

  for p in {accuracy,compatibility,performance}; do
    install -m 755 bsnes/out/bsnes-$p "${pkgdir}"/usr/bin/
  done
}