Package Details: toppler-git 1.3+8+r542.20220323.c8bf02b-5

Git Clone URL: https://aur.archlinux.org/toppler-git.git (read-only, click to copy)
Package Base: toppler-git
Description: A reimplementation of the classic jump & run game "Nebulus"
Upstream URL: https://gitlab.com/roever/toppler/
Keywords: game nebulus
Licenses: GPL-3.0-or-later
Conflicts: toppler
Provides: toppler
Replaces: toppler-darcs
Submitter: SanskritFritz
Maintainer: SanskritFritz (dreieck)
Last Packager: dreieck
Votes: 2
Popularity: 0.000000
First Submitted: 2022-02-03 09:40 (UTC)
Last Updated: 2024-10-10 09:46 (UTC)

Dependencies (12)

Required by (1)

Sources (3)

Latest Comments

« First ‹ Previous 1 2

dreieck commented on 2022-02-03 16:23 (UTC)

Standalone levels (to play individually and to load in the level editor) provided by package "toppler-levels-git".

dreieck commented on 2022-02-03 15:40 (UTC) (edited on 2022-02-03 20:05 (UTC) by dreieck)

A big thank you for continuing with maintaining this game's package!

Since this package uses the latest git checkout always, you need some logic to automatically adapt $pkgver.

That is what the pkgver() function is for.

And, also add appropriate provides and conflicts entries, and git needs to be added to makedepends.

Also, gimp needs to be a makedepend (there are .xcf files in the source that get converted) as well as povray and gettext and imagemagick. I might have forgotten some.

Here is a revorked PKGBUILD which addresses all that issues (and has some other additions). For me it builds:

PKGBUILD:

# Maintainer: SanskritFritz (gmail)
# Controbutor: dreieck

_pkgname=toppler
pkgname="${_pkgname}-git"
pkgver=1.2+10+r531.20220201.8596a68
pkgrel=2
pkgdesc='A reimplementation of the classic jump & run game "Nebulus"'
arch=('i686' 'x86_64')
url="https://gitlab.com/roever/toppler/"
license=('GPL3')
depends=(
  'gcc-libs'
  'sdl2_mixer'
  'zlib'
)
makedepends=(
  'gettext'
  'gimp'
  'git'
  'imagemagick'
  'povray'
)
optdepends=(
  "${_pkgname}-levels: The upstream levels as individual missions that can be played individually, and files that can be loaded into the level editor."
)
provides=(
  "${_pkgname}=${pkgver}"
)
conflicts=(
  "${_pkgname}"
)
replaces=(
  "${_pkgname}-darcs"
)
source=(
  "${_pkgname}::git+https://gitlab.com/roever/toppler.git"
  "toppler.desktop"
)
sha256sums=(
  'SKIP'
  '828b4f8f6901e757de8cce76473caa1064b2db1375330eee370b0eff79909e9a'
)

pkgver () {
  cd "${srcdir}/${_pkgname}"
  _ver="$(git describe  --tags | sed 's|^v||' | sed 's|-[^-]*$||' | tr '-' '+')"
  _rev="$(git rev-list --count HEAD)"
  _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
  _hash="$(git rev-parse --short HEAD)"

  if [ -z "${_ver}" ]; then
    error "Version could not be determined."
    return 1
  else
    printf '%s' "${_ver}+r${_rev}.${_date}.${_hash}"
  fi
}

build() {
  cd "${srcdir}/${_pkgname}"
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  make DESTDIR="${pkgdir}" install
  install -D -v -m644 "${srcdir}/toppler.desktop" "${pkgdir}/usr/share/applications/toppler.desktop"
  for _docfile in README.md doc/*; do
    install -D -v -m644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
  done
  install -D -v -m644 'COPYING' "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.GPL3.txt"
}

SanskritFritz commented on 2022-02-03 09:42 (UTC)

https://gitlab.com/roever/toppler/-/issues/1