Advertisement
CrankySupertoon

Untitled

Apr 11th, 2020
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. # Maintainer: CrankySupertoon <crankysupertoon@gmail.com.com>
  2.  
  3. pkgname=mesen-s-git
  4. _pkgname=Mesen-S
  5. pkgver=0.3.0.r160.g1b44400
  6. pkgrel=1
  7. pkgdesc='A cross-platform Super Nintendo emulator'
  8. arch=('x86_64')
  9. makedepends=('clang' 'gendesk' 'zip')
  10. depends=('mono' 'sdl2')
  11. conflicts=('mesen-s-git')
  12. provides=('mesen-s-git')
  13. license=('GPL3')
  14. source=("${_pkgname}::git+https://github.com/SourMesen/Mesen-S.git")
  15. sha256sums=('SKIP')
  16.  
  17. pkgver() {
  18. cd "${srcdir}/${_pkgname}"
  19.  
  20. git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  21. }
  22.  
  23. prepare() {
  24. cd "${srcdir}/${_pkgname}"
  25.  
  26. # Prevent duplicate .desktop from getting created
  27. sed -i 's/CreateShortcutFile(desktopFile, mimeTypes);//' UI/Config/FileAssociationHelper.cs
  28.  
  29. gendesk --pkgname "${_pkgname}" --pkgdesc "${pkgdesc}" --exec "/usr/bin/mesen-s" -n
  30.  
  31. # Invoke using mono in a wrapper, since wine (if installed) would open it otherwise
  32. cat > "${pkgname}" <<-EOT
  33. #!/bin/sh
  34. /usr/bin/mono /opt/Mesen-S/Mesen-S "\$@"
  35. EOT
  36. }
  37.  
  38. build() {
  39. cd "${srcdir}/${_pkgname}"
  40.  
  41. mkdir -p bin
  42. make
  43. }
  44.  
  45. package() {
  46. cd "${srcdir}/${_pkgname}"
  47.  
  48. install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname%%-git}"
  49. install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
  50.  
  51. cd "${srcdir}/${_pkgname}/UI/Resources"
  52. install -Dm644 "MesenSIcon.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
  53.  
  54. cd "${srcdir}/${_pkgname}/bin/x64/Release"
  55. install -Dm755 "${_pkgname}.exe" "${pkgdir}/opt/${_pkgname}/${_pkgname}"
  56.  
  57. cd "${srcdir}/${_pkgname}/InteropDLL/obj.x64"
  58. install -Dm644 "libMesenSCore.x64.dll" "${pkgdir}/usr/lib/libMesenSCore.dll"
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement