Skip to content

Instantly share code, notes, and snippets.

@grawlinson grawlinson/endless-sky.patch Secret
Created Aug 29, 2018

Embed
What would you like to do?
Patch for Endless Sky
diff --git a/PKGBUILD b/PKGBUILD
index 7b6b180..3c41273 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,65 +1,62 @@
# Maintainer: Max Zhao <alcasa dot mz at gmail dot com>
# Contributor: Leonard König <leonard.r.koenig at googlemail dot com>
+# Contributor: George Rawlinson <george@rawlinson.net.nz>
-pkgname='endless-sky'
+pkgname=endless-sky
pkgver=0.9.8
pkgrel=1
arch=('i686' 'x86_64')
url="http://endless-sky.github.io/"
-# libpng and libgl are already fetched by sdl2
-# xdg-utils for icon cache
-depends=('sdl2' 'libjpeg-turbo' 'glew' 'openal' 'hicolor-icon-theme' 'xdg-utils' 'libmad')
-makedepends=('git' 'scons')
+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"
-install=${pkgname}.install
-source=(
-"https://github.com/endless-sky/endless-sky/archive/v${pkgver}.tar.gz"
- "${pkgname}.install")
-
-md5sums=('7e5be32a89834d47fca216ab81a1f2ca'
- '737bc185c599447d4eef7c215dabecc9')
-#
-# PKGEXT='.pkg.tar'
-#
+source=("$pkgname-$pkgver.tar.gz::https://github.com/endless-sky/endless-sky/archive/v${pkgver}.tar.gz")
+sha512sums=('521026cb70372fd380b14a1a1d296f86015e5999dc233f4d9c05d958092e1f3982d2f12e913a435d5827fb45945bd4b60bbae293c2c90685024cdae96e352078')
build() {
- cd $pkgname-$pkgver
- scons
- # gzip manpage
- gzip -f endless-sky.6
+ cd $pkgname-$pkgver
+ scons
}
package() {
- cd $pkgname-$pkgver
- # Install executables
- install -D --mode=755 endless-sky ${pkgdir}/usr/bin/endless-sky
+ cd $pkgname-$pkgver
+
+ # Install executable
+ install -Dm755 -t "${pkgdir}/usr/bin" endless-sky
# resources
## They explicitly want this path. Although one could workaround with '-r' param
- install --directory ${pkgdir}/usr/share/games/${pkgname}
- cp -rf data images sounds ${pkgdir}/usr/share/games/${pkgname}/
- install -D --mode=644 credits.txt ${pkgdir}/usr/share/games/${pkgname}/credits.txt
- install -D --mode=644 keys.txt ${pkgdir}/usr/share/games/${pkgname}/keys.txt
-
- # icons and .desktop
- _idir=endless-sky.iconset
- _iddir=${pkgdir}/usr/share/icons/hicolor
-
- install -D --mode=644 icons/icon_16x16.png ${_iddir}/16x16/apps/${pkgname}.png
- install -D --mode=644 icons/icon_22x22.png ${_iddir}/22x22/apps/${pkgname}.png
- install -D --mode=644 icons/icon_24x24.png ${_iddir}/24x24/apps/${pkgname}.png
- install -D --mode=644 icons/icon_32x32.png ${_iddir}/32x32/apps/${pkgname}.png
- install -D --mode=644 icons/icon_48x48.png ${_iddir}/48x48/apps/${pkgname}.png
- install -D --mode=644 icons/icon_256x256.png ${_iddir}/256x256/apps/${pkgname}.png
- install -D --mode=644 endless-sky.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
+ install --directory "${pkgdir}/usr/share/games/${pkgname}"
+ cp -rf data images sounds "${pkgdir}/usr/share/games/${pkgname}/"
+ install -Dm644 credits.txt "${pkgdir}/usr/share/games/${pkgname}/credits.txt"
+ install -Dm644 keys.txt "${pkgdir}/usr/share/games/${pkgname}/keys.txt"
+
+ # .desktop
+ install -Dm644 -t "${pkgdir}/usr/share/applications" endless-sky.desktop
+
+ # icons
+ for res in 16 22 24 32 48 256; do
+ install -Dm644 \
+ "${srcdir}/${pkgname}-${pkgver}/icons/icon_${res}x${res}.png" \
+ "${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${pkgname}.png"
+ done
+
+ # mac icon directory has additional icons [128+512px]
+ for res in 128 512; do
+ install -Dm644 \
+ "${srcdir}/${pkgname}-${pkgver}/icons/endless-sky.iconset/icon_${res}x${res}.png" \
+ "${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${pkgname}.png"
+ done
# manpage
- install -D --mode=644 endless-sky.6.gz ${pkgdir}/usr/share/man/man6/${pkgname}.6.gz
+ install -Dm644 -t "${pkgdir}/usr/share/man/man6" endless-sky.6
# copyright
- install -D --mode=644 copyright ${pkgdir}/usr/share/licenses/${pkgname}/copyright
+ install -Dm644 copyright "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set ts=2 sw=2 et:
diff --git a/endless-sky.install b/endless-sky.install
deleted file mode 100644
index 6855d32..0000000
--- a/endless-sky.install
+++ /dev/null
@@ -1,9 +0,0 @@
-post_install() {
- update-desktop-database -q
-}
-
-post_remove() {
- update-desktop-database -q
-}
-
-# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.