makedeb


tunics 0.3+ci-3


Roguelike-like Zelda game for the Solarus engine

Viewing /PKGBUILD.

View raw.

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

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Qontinuum (AUR) <qontinuum.dev@protonmail.ch>

pkgname=tunics
_pkgname=Tunics
pkgver="0.3+ci"
pkgrel=3
pkgdesc="Roguelike-like Zelda game for the Solarus engine"
arch=('all')
url="https://solarus-games.org/en/games/tunics"
license=('GPL3' 'MIT' 'custom')
depends=('solarus>=1.6.0')
makedepends=('cmake' 'zip')
source=("https://gitlab.com/syllan-games/patched-tunics/-/archive/$pkgver/patched-tunics-$pkgver.tar.gz"
        "${pkgname}.png::https://solarus-games.org/data/en/entities/game/tunics/icons/icon_64x64.png")
b2sums=('71787dad810c69d6780a333506baebc981840a25ad04f2a19ba96ed73eb37f33210aa3b2acb7c650ec7ac1e0c5463c58a6ae678bd205bdf5723dbbddd0b74d44'
        '3be99ce7d270c5efecc93e13feb58779d86cdf776f86faacd2de285196170eeff8eb28e3ff5be34bea2a02b7610306f42dedc40c52e85b7c687564b47da7f75a')

build() {
  cd patched-$pkgname-$pkgver
  cmake -DCMAKE_INSTALL_PREFIX='/usr' .
  make

export _DESKTOPFILE="[Desktop Entry]
Version=1.0
Type=Application
Name=$_pkgname
Comment=$pkgdesc
Exec=$pkgname
Icon=$pkgname
Terminal=false
StartupNotify=false
Categories=Game;ActionGame;"
}

package() {
  cd patched-$pkgname-$pkgver
  # /usr/games
  install -m755 -d "$pkgdir/usr/games"
  echo "#!/bin/sh
exec solarus-run /usr/share/games/solarus/$pkgname/data.solarus \"\$@\"" > "$pkgdir/usr/games/$pkgname"
  chmod 755 "$pkgdir/usr/games/$pkgname"
  # /usr/share/games
  install -m755 -d "$pkgdir/usr/share/games/solarus/$pkgname"
  install -Dm644 data.solarus "$pkgdir/usr/share/games/solarus/$pkgname/"
  # doc
  install -m755 -d "$pkgdir/usr/share/doc/$pkgname"
  install -Dm644 license.txt "$pkgdir/usr/share/doc/$pkgname/license"
  install -Dm644 CREDITS.txt "$pkgdir/usr/share/doc/$pkgname/credits"
  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/readme"
  install -Dm644 ChangeLog "$pkgdir/usr/share/doc/$pkgname/changelog"
  gzip "$pkgdir/usr/share/doc/$pkgname/changelog"
  # desktop file
  install -m0755 -d "$pkgdir/usr/share/applications"
  echo "$_DESKTOPFILE" > "$pkgdir/usr/share/applications/$pkgname.desktop"
  # pixmap
  install -m0755 -d "$pkgdir/usr/share/pixmaps"
  install -Dm644 ../${pkgname}.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
}