summaryrefslogtreecommitdiff
path: root/pcr/mgba-git/PKGBUILD
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-16 18:19:18 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-16 18:20:01 -0300
commit3de44067cd59abae96fae3d93cd1e96b3c62ff0a (patch)
tree947d4d74c2a3fa45e38c0a415713365e2ee572b1 /pcr/mgba-git/PKGBUILD
parent1ee9ea117537fb38962fa2cffe81ff93aafe4ee1 (diff)
downloadabslibre-3de44067cd59abae96fae3d93cd1e96b3c62ff0a.tar.gz
abslibre-3de44067cd59abae96fae3d93cd1e96b3c62ff0a.tar.bz2
abslibre-3de44067cd59abae96fae3d93cd1e96b3c62ff0a.zip
add mgba to [pcr]
Diffstat (limited to 'pcr/mgba-git/PKGBUILD')
-rw-r--r--pcr/mgba-git/PKGBUILD76
1 files changed, 76 insertions, 0 deletions
diff --git a/pcr/mgba-git/PKGBUILD b/pcr/mgba-git/PKGBUILD
new file mode 100644
index 000000000..f08f1c107
--- /dev/null
+++ b/pcr/mgba-git/PKGBUILD
@@ -0,0 +1,76 @@
+# Maintainer: Márcio Silva <coadde@parabola.nu>
+
+# Based on mgba package
+
+_pkgbase=mgba
+pkgbase=mgba-git
+pkgname=('libmgba-git' 'mgba-sdl-git' 'mgba-qt-git')
+pkgver=r2457.3a9ac18
+pkgrel=1
+arch=('i686' 'x86_64')
+url='https://endrift.com/mgba/'
+license=('custom:MPL2')
+makedepends=('cmake' 'qt5-multimedia' 'sdl2' 'zlib' 'libpng' 'libzip' 'libedit'
+ 'ffmpeg' 'imagemagick' 'desktop-file-utils' 'git')
+source=($_pkgbase::git+https://github.com/mgba-emu/mgba.git
+ mgba.desktop)
+sha1sums=('SKIP'
+ '0f6f43ed45b702f6571c254d4717fbc1fe15e845')
+
+pkgver() {
+ cd mgba
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ [[ ! -d build ]] && mkdir build || rm -rf build
+
+ cd $_pkgbase/res
+ convert mgba-1024.png -resize 256x256 mgba-256.png
+}
+
+build() {
+ cd build
+ cmake "$srcdir"/$_pkgbase -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_libmgba-git() {
+ pkgdesc='Shared library of mGBA'
+ depends=('zlib' 'libpng' 'libzip' 'libedit' 'ffmpeg' 'imagemagick')
+ provides=('libmgba')
+ conflicts=('libmgba')
+
+ cmake -DCOMPONENT=libmgba $_pkgbase -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
+ -P build/cmake_install.cmake
+ install -Dm644 $_pkgbase/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_mgba-sdl-git() {
+ pkgdesc='A Nintendo Gameboy Advance Emulator focusing on both speed and accuracy'
+ depends=('libmgba' 'sdl2')
+ provides=('mgba-sdl')
+ conflicts=('mgba-sdl')
+
+ cmake -DCOMPONENT=mgba-sdl $_pkgbase -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
+ -P build/cmake_install.cmake
+
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s /usr/share/licenses/libmgba/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_mgba-qt-git() {
+ pkgdesc='A Nintendo Gameboy Advance Emulator focusing on both speed and accuracy. Qt5 UI.'
+ depends=('libmgba' 'qt5-multimedia' 'sdl2')
+ provides=('mgba-qt')
+ conflicts=('mgba-qt')
+
+ cmake -DCOMPONENT=mgba-qt $_pkgbase -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
+ -P build/cmake_install.cmake
+
+ desktop-file-install mgba.desktop --dir "$pkgdir"/usr/share/applications/
+ install -Dm644 $_pkgbase/res/mgba-256.png "$pkgdir"/usr/share/pixmaps/mgba.png
+
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s /usr/share/licenses/libmgba/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}