summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Riedel2021-02-27 23:59:50 +0100
committerSebastian Riedel2021-02-27 23:59:50 +0100
commit470ac29693751ce43ba97147ba7f0230f95579f6 (patch)
treed5f782cea4040347c64916ea7afa4e4f2b6c8dd2
parent8ebd908606333bfdd68871f5643376bdea799673 (diff)
downloadaur-470ac29693751ce43ba97147ba7f0230f95579f6.tar.gz
Switch to make install
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD38
2 files changed, 15 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d21cd4fc373e..d367db71598a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = sameboy-git
pkgdesc = An accuracy-focused Game Boy/Game Boy Color emulator
- pkgver = 1413.8ad08c1b
+ pkgver = 1452.ec2661ac
pkgrel = 1
url = https://github.com/LIJI32/SameBoy
arch = x86_64
@@ -8,9 +8,6 @@ pkgbase = sameboy-git
makedepends = rgbds
makedepends = make
makedepends = git
- makedepends = gendesk
- makedepends = libicns
- makedepends = imagemagick
depends = sdl2
depends = hicolor-icon-theme
provides = sameboy
diff --git a/PKGBUILD b/PKGBUILD
index 206239fcbc14..cf61d349b1cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,10 +2,8 @@
# Maintainer: basxto <archlinux basxto de>
pkgname=sameboy-git
-_genericname="Emulator"
pkgdesc="An accuracy-focused Game Boy/Game Boy Color emulator"
-_mimetype="application/x-gameboy-rom;application/x-gameboy-color-rom"
-pkgver=1413.8ad08c1b
+pkgver=1452.ec2661ac
pkgrel=1
arch=(x86_64)
url="https://github.com/LIJI32/SameBoy"
@@ -13,14 +11,12 @@ license=(MIT)
provides=(sameboy)
depends=(sdl2 hicolor-icon-theme)
# Upstream suggests using clang, but gcc is supported on Linux: https://github.com/LIJI32/SameBoy/issues/164#issuecomment-486464194
-makedepends=(rgbds make git gendesk libicns imagemagick)
+makedepends=(rgbds make git)
source=(git+https://github.com/LIJI32/SameBoy)
sha1sums=('SKIP')
prepare(){
- gendesk -f -n
sed -i 's/-Werror//' SameBoy/Makefile
- icns2png -x "${srcdir}/SameBoy/Cocoa/AppIcon.icns" -o "${srcdir}"
}
pkgver(){
@@ -29,26 +25,20 @@ pkgver(){
}
build(){
- cd SameBoy
- make sdl CONF=release DATA_DIR=/usr/share/games/sameboy/
+ make -C SameBoy sdl CONF=release PREFIX=/usr/
}
package(){
- # copy existing icon sizes
- for i in 16 32 256 512 1024;do
- install -d "${pkgdir}/usr/share//icons/hicolor/${i}x${i}/apps/"
- install -Dm644 "${srcdir}/AppIcon_${i}x${i}x32.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${provides[0]}.png"
- done
- # generate all other icon sizes
- for i in 24 48 64 72 96 128;do
- install -d "${pkgdir}/usr/share//icons/hicolor/${i}x${i}/apps/"
- magick convert "${srcdir}/AppIcon_256x256x32.png" -resize ${i}x${i} "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${provides[0]}.png"
- done
- install -Dm644 "${provides[0]}.desktop" "${pkgdir}/usr/share/applications/${provides[0]}.desktop"
cd SameBoy
- install -Dm755 build/bin/SDL/sameboy "$pkgdir/usr/bin/sameboy"
- find build/bin/SDL -type f -not -executable | while read f; do
- install -Dm644 "$f" "$pkgdir/usr/share/games/sameboy/${f#build/bin/SDL/}"
- done
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/sameboy-git/LICENSE"
+
+ make install CONF=release PREFIX=/usr/ DESTDIR="${pkgdir}"
+ # desktop file is missing from make install
+ install -Dm644 FreeDesktop/${provides[0]}.desktop "${pkgdir}/usr/share/applications/${provides[0]}.desktop"
+ # mimetype icons don't belong here
+ # that could lead to file conflicts
+ find "${pkgdir}" -name 'x-gameboy*-rom.png' -delete
+ find "${pkgdir}" -name mimetypes -delete
+ # move license to the correct path for arch
+ install -d "${pkgdir}"/usr/share/licenses/${pkgname}/
+ mv "${pkgdir}"/usr/share/${provides[0]}/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/
}