makedeb


zsxd 1.12.2-1


Zelda: Mystery of Solarus XD - an open-source parodic fangame

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for zsxd.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Homer Xing (AUR) <homer dot hsing @t gmail dot com>
# Contributor: Qontinuum (AUR) <qontinuum dot dev @t protonmail dot ch>
# Contributor: BenObiWan (AUR) <benobiwan @t gmail dot com>
# Contributor: Sam101 (AUR) <zoetrem @t gmail dot com>
# Contributor: BenObiWan (AUR) <benobiwan @t gmail dot com>
# Contributor: Huulivoide (AUR)

pkgname=zsxd
pkgver=1.12.2
pkgrel=1
pkgdesc="Zelda: Mystery of Solarus XD - an open-source parodic fangame"
arch=('all')
url="https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-xd"
license=('GPL3' 'custom')
depends=('solarus>=1.6.0')
makedepends=('cmake' 'zip')
source=("https://gitlab.com/solarus-games/${pkgname}/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
b2sums=('1cba628a427cae10e0b08498690b95ef5a60f62531b1b4c7635ccbd561201ff54511b5c32e8e5e3251625e08276466ef2faa81f62eb2b67669cc001b00b7f215')

build() {
  cd "${srcdir}/${pkgname}-v${pkgver}"
  cmake -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=Release .
  make

export _WRAPPER="#!/bin/sh
exec solarus-run /usr/share/games/solarus/$pkgname/data.solarus \"\$@\""
}

package() {
  cd "${srcdir}/${pkgname}-v${pkgver}"
  # doc
  install -Dm644 changelog.txt "${pkgdir}/usr/share/doc/${pkgname}/changelog"
  install -Dm644 readme.md "${pkgdir}/usr/share/doc/${pkgname}/readme"
  install -Dm644 license.txt "${pkgdir}/usr/share/doc/${pkgname}/license"
  gzip "${pkgdir}/usr/share/doc/${pkgname}/changelog"
  # install
  make DESTDIR="${pkgdir}/" PREFIX="/usr" install
  # adjustments
  install -d "${pkgdir}/usr/share/games"
  mv -T  "${pkgdir}/usr/share/solarus" "${pkgdir}/usr/share/games/solarus"
  mv -T "${pkgdir}/usr/bin" "${pkgdir}/usr/games"
  echo "$_WRAPPER" > "$pkgdir/usr/games/$pkgname"
  chmod 755 "$pkgdir/usr/games/$pkgname"
}