summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2ea9ca2419bedc6b40fd2582f88312ed062d9706 (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
62
63
64
65
66
67
68
69
70
71
# Maintainer: ThaChillera ThaChillera@protonmail.com
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Lightning <sgsdxzy@gmail.com>

# latest version obtained from this API endpoint: https://dolphin-emu.org/update/latest/beta/
pkgbase=dolphin-emu-beta-git
pkgname=('dolphin-emu-beta-git' 'dolphin-emu-beta-nogui-git')
pkgver=5.0.r11991.8d4e8314a3
pkgrel=1
pkgdesc='A GameCube / Wii / Triforce emulator - monhtly beta release'
arch=('x86_64')
url='http://www.dolphin-emu.org/'
license=('GPL')
depends=(
  'alsa-lib' 'bluez-libs' 'enet' 'hidapi' 'libevdev' 'libgl' 'libpng'
  'libpulse' 'libx11' 'libxi' 'libxrandr' 'lzo' 'mbedtls' 'pugixml' 'qt5-base'
  'sfml' 'zlib'
  'libavcodec.so' 'libavformat.so' 'libavutil.so' 'libcurl.so'
  'libminiupnpc.so' 'libswscale.so' 'libudev.so' 'libusb-1.0.so' 'libxxhash.so'
)
makedepends=('cmake' 'git' 'libglvnd' 'python')
optdepends=('pulseaudio: PulseAudio backend')
options=('!emptydirs')
source=('dolphin-emu::git+https://github.com/dolphin-emu/dolphin.git#commit=8d4e8314a3dcd8680ae81d91fb7e076b4496b43b')
sha256sums=('SKIP')

pkgver() {
  cd dolphin-emu

  git describe | sed 's/-/.r/; s/-g/./'
}

prepare() {
  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
}

build() {
  cd build

  cmake ../dolphin-emu \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCMAKE_INSTALL_LIBDIR='/usr/lib' \
    -DENABLE_QT='TRUE' \
    -DUSE_SHARED_ENET='TRUE' \
    -DXXHASH_FOUND='TRUE'\
    -DDISTRIBUTOR='aur.archlinux.org'
  make
}

package_dolphin-emu-beta-git() {
  provides=('dolphin-emu')
  conflicts=('dolphin-emu')

  make DESTDIR="${pkgdir}" -C build install
  rm "${pkgdir}"/usr/bin/dolphin-emu-nogui
  rm -rf "${pkgdir}"/usr/{include,lib/libdiscord-rpc.a}

  install -Dm 644 dolphin-emu/Data/51-usb-device.rules -t "${pkgdir}"/usr/lib/udev/rules.d/
}

package_dolphin-emu-beta-nogui-git() {
  depends=('dolphin-emu-beta-git')

  install -dm 755 "${pkgdir}"/usr/bin
  install -m 755 build/Binaries/dolphin-emu-nogui "${pkgdir}"/usr/bin/dolphin-emu-cli
}

# vim: ts=2 sw=2 et: