# Maintainer: jc_gargma # Maintainer (AUR): George Rawlinson # Contributor (AUR): Max Zhao # Contributor (AUR): Leonard König # # I maintain this because: # AUR version uses /usr/share/games pkgname=endless-sky pkgver=0.9.12 pkgrel=3 arch=('i686' 'x86_64' 'aarch64') url="https://endless-sky.github.io/" depends=(openal libpng glew hicolor-icon-theme libjpeg-turbo sdl2 libmad) makedepends=(scons) optdepends=('endless-sky-high-dpi: high resolution graphics assets' 'endless-sky-editor: map editor') license=('GPL3' 'CCPL' 'custom:public domain') pkgdesc="A space exploration and combat game similar to Escape Velocity" source=("$pkgname-$pkgver.tar.gz::https://github.com/endless-sky/endless-sky/archive/v${pkgver}.tar.gz" ${pkgname}.desktop 0001-fix-Add-missing-string-include.patch) b2sums=('8df20650524cb179e92306084668a8e341f88ca5adb1c6b6e2e48d450556a36556efcbff256dd6c0f47b4435739cfdbc7af357285af4ab15d5355e8f0ecba923' 'cccce9f6d4da294ab7f71a6f441c6c04fb9498dd0e6a90f4566fcbbfdb70fd90b8ec966e82678739340d35a3f906e34c9d5ea0e3b590897a79bbab0e8763ef9b' '87bce26dee8a4626ebdd2a8cc71ec87ca48c55295853db7b824a3429a96552a0fa00c2b8dcd009ece889937e5bfeba5ce983f1a399fb1437dfa0d5af213adb08') # remove this in the next version, as the patch is backported from upstream prepare() { cd "$pkgname-$pkgver" patch -sp1 < "$srcdir/0001-fix-Add-missing-string-include.patch" } build() { cd "$pkgname-$pkgver" export CFLAGS="$CFLAGS -O3 -flto=4 -fPIE" export CXXFLAGS="$CXXFLAGS -O3 -flto=4 -fPIE" export LDFLAGS="$LDFLAGS,-pie" scons "${MAKEFLAGS}" } package() { cd "$pkgname-$pkgver" # Install executable install -Dm755 endless-sky "${pkgdir}/usr/bin/endless-sky" # resources # hard coded paths are evil install -Dm644 credits.txt "${pkgdir}/usr/lib/${pkgname}/credits.txt" install -Dm644 keys.txt "${pkgdir}/usr/lib/${pkgname}/keys.txt" cp -rf data images sounds "${pkgdir}/usr/lib/${pkgname}/" # .desktop install -Dm644 ${srcdir}/endless-sky.desktop "${pkgdir}/usr/share/applications/endless-sky.desktop" # icons for res in 16 22 24 32 48 128 256 512; do install -Dm644 \ "${srcdir}/${pkgname}-${pkgver}/icons/icon_${res}x${res}.png" \ "${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${pkgname}.png" done # manpage install -Dm644 -t "${pkgdir}/usr/share/man/man6" endless-sky.6 # copyright install -Dm644 copyright "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }