# Maintainer: exponential # Contributor: Alexander Jacocks (AUR) # Contributor: Frederic Bezies (AUR) # Contributor: Benjamin Hodgetts (AUR) pkgname=1oom-git _pkgname=1oom pkgver=1.0.r1.cc2b61c pkgrel=1 pkgdesc="1oom is a Master of Orion (1993) game engine recreation." arch=('amd64' 'i386') url="https://gitlab.com/Tapani_/${_pkgname}" license=('GPL2') makedepends=('git' 'libsdl2-dev' 'libsdl2-mixer-dev' 'libsamplerate0-dev') depends=('libsdl2-2.0-0' 'libsdl2-mixer-2.0-0' 'libsamplerate0') optdepends=('timgm6mb-soundfont: Soundfont, average but small' 'fluid-soundfont-gm: Soundfont, good but big' 'game-data-packager: Installer for game data files') provides=("${_pkgname}") conflicts=("${_pkgname}") source=("git+${url}.git" "${_pkgname}.png" "${_pkgname}.desktop") b2sums=('SKIP' '9698161cc4a241d13f7c377b4417ae5807d02a0ee544929fac98d60d454f2c9784223e9764ad5ef568afc6b69af6cd9d729c4a59bbc4a7161bb30d053eb30390' '3e137452bec8de0af7e7dee85c5ade673dd02abf15b4c4255c266278dc57bb3243c1950922d2e10b37571552acf0253f936347a7fad56a542e2f20e1e70b9e83') pkgver() { cd "${srcdir}/${_pkgname}" printf "%s.r%s.%s" "$(grep 'VERSION_1OOM=' configure.ac | cut -d 'v' -f 2)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build() { cd "${_pkgname}" autoreconf -fi test -d build-native || mkdir build-native cd build-native ../configure --prefix=/usr --bindir=/usr/games make -j "$(nproc)" } package() { cd "${srcdir}/${_pkgname}" make PREFIX="/usr" DESTDIR="${pkgdir}" install -C "build-native" # install docs mkdir -p "$pkgdir/usr/share/doc/${_pkgname}/instructions" install -Dm644 README.md "$pkgdir/usr/share/doc/${_pkgname}/readme" cp doc/*.txt "$pkgdir/usr/share/doc/${_pkgname}/instructions/" cp AUTHORS CODE_OF_CONDUCT COPYING HACKING NEWS PHILOSOPHY "$pkgdir/usr/share/doc/${_pkgname}/" # Convenience symlink ln -s "/usr/games/1oom_classic_sdl2" "$pkgdir/usr/games/${_pkgname}" # install icon and desktop file install -Dm644 "${srcdir}/${_pkgname}.png" "$pkgdir/usr/share/icons/hicolor/96x96/apps/${_pkgname}.png" install -Dm644 "${srcdir}/${_pkgname}.desktop" "$pkgdir/usr/share/applications/${_pkgname}.desktop" }