upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / mgba / trunk / PKGBUILD
blob325759b248dc9a8638b05d82f37af4db5c4bf604
1 # Maintainer:  Jonathan Steel <jsteel at archlinux.org>
2 # Contributor: BartÅ‚omiej Piotrowski <bpiotrowski@archlinux.org>
3 # Contributor: Duck Hunt <vaporeon@tfwno.gf>
5 pkgbase=mgba
6 pkgname=('libmgba' 'mgba-sdl' 'mgba-qt')
7 pkgver=0.10.2
8 pkgrel=1
9 arch=('x86_64')
10 url='http://mgba.io'
11 license=('custom:MPL2')
12 makedepends=('cmake' 'qt5-multimedia' 'sdl2' 'zlib' 'libpng' 'libzip' 'libedit'
13              'ffmpeg' 'desktop-file-utils' 'qt5-tools')
14 source=($pkgbase-$pkgver.tar.gz::https://github.com/mgba-emu/mgba/archive/$pkgver.tar.gz)
15 sha256sums=('60afef8fb79ba1f7be565b737bae73c6604a790391c737f291482a7422d675ae')
17 build() {
18   cmake -B build -S mgba-$pkgver \
19     -DCMAKE_BUILD_TYPE=None \
20     -DCMAKE_INSTALL_PREFIX=/usr \
21     -DCMAKE_INSTALL_LIBDIR=lib \
22     -Wno-dev
23   cmake --build build
26 package_libmgba() {
27   pkgdesc='Shared library of mGBA'
28   depends=('zlib' 'libpng' 'libzip' 'libedit' 'ffmpeg' 'sqlite')
30   cmake -DCOMPONENT=libmgba mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
31     -P build/cmake_install.cmake
33   cmake -DCOMPONENT=mgba-dev mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
34     -P build/cmake_install.cmake
36   install -Dm644 mgba-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
39 package_mgba-sdl() {
40   pkgdesc='A Nintendo Gameboy Advance Emulator focusing on both speed and accuracy'
41   depends=('libmgba' 'sdl2')
43   cmake -DCOMPONENT=mgba-sdl mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
44     -P build/cmake_install.cmake
46   install -d "$pkgdir"/usr/share/licenses/$pkgname
47   ln -s /usr/share/licenses/libmgba/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
50 package_mgba-qt() {
51   pkgdesc='A Nintendo Gameboy Advance Emulator focusing on both speed and accuracy. Qt5 UI.'
52   depends=('libmgba' 'qt5-multimedia' 'sdl2')
54   cmake -DCOMPONENT=mgba-qt mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
55     -P build/cmake_install.cmake
57   install -Dm644 mgba-$pkgver/res/mgba-256.png "$pkgdir"/usr/share/pixmaps/io.mgba.mGBA.png
59   install -d "$pkgdir"/usr/share/licenses/$pkgname
60   ln -s /usr/share/licenses/libmgba/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE