makedeb


ardentryst-git 1.8.r2.7b66716-1


An action/RPG sidescoller with a focus on story and character development

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for ardentryst-git.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: (AUR) <reg-archlinux AT klein DOT tuxli DOT ch> 
# Contributor: Anton Bazhenov (AUR) <anton.bazhenov at gmail>
# Contributor: Christoph Zeiler (AUR) <archNOSPAM_at_moonblade.dot.org>
# Contributor: Adria Arrufat (archdria) (AUR) <swiftscythe@gmail.com>

_pkgname=ardentryst
pkgname=${_pkgname}-git
pkgver=1.8.r2.7b66716
pkgrel=1
pkgdesc="An action/RPG sidescoller with a focus on story and character development"
arch=('all')
provides=(${_pkgname})
conflicts=(${_pkgname})
url="https://github.com/ardentryst/ardentryst"
license=('GPL3' 'CCPL')
depends=('python3-pygame') 
makedepends=('git') 
source=(git+https://github.com/ardentryst/ardentryst.git)
b2sums=('SKIP')

pkgver() {
	cd "${_pkgname}"
	printf "%s.r%s.%s" "$(grep "^VERSION =" ardentryst.py | sed 's/.*(//;s/-.*//')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "${srcdir}"/"${_pkgname}"

  # install data
  install -m755 -d "${pkgdir}"/usr/share/games/${_pkgname}
  cp -rf \
    {Base,Data,Fonts,Levels,Music,Sounds,COPYING*,README.md} \
    *.{py,txt,png,xml,dig} \
    "${pkgdir}"/usr/share/games/${_pkgname}/

  # set permissions
  find "${pkgdir}"/usr/share/games/${_pkgname} -type d -exec chmod 755 {} +
  find "${pkgdir}"/usr/share/games/${_pkgname} -type f -exec chmod 644 {} +

  # doc
  install -dm755 "${pkgdir}"/usr/share/doc/${_pkgname}/
  ln -sf /usr/share/games/${_pkgname}/README.md "${pkgdir}"/usr/share/doc/${_pkgname}/readme
  ln -sf /usr/share/games/${_pkgname}/COPYING "${pkgdir}"/usr/share/doc/${_pkgname}/license 

  # install icon
  install -Dm644 icon.png "${pkgdir}"/usr/share/pixmaps/${_pkgname}.png

  # install .desktop file
  install -Dm644 Ardentryst.desktop "${pkgdir}"/usr/share/applications/${_pkgname}.desktop

  # install launcher
install -dm644 "${pkgdir}"/usr/games
launcher='#!/bin/sh

cd /usr/share/games/ardentryst
exec python3 ardentryst.py "$@"'

  echo "$launcher" > "${pkgdir}"/usr/games/${_pkgname}
  chmod 755 "${pkgdir}"/usr/games/${_pkgname}
}