Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fixes/improvements/cleanups for mrrescue AUR package
From 855bc0c2b31566c9df9ecb7f0f18dddcc5e36dbc Mon Sep 17 00:00:00 2001
From: Carsten Teibes <dev@f4ke.de>
Date: Tue, 1 Sep 2015 15:31:22 +0200
Subject: [PATCH] Add interpreter to launcher script, improve .desktop entry
and cleanup PKGBUILD a bit
---
.SRCINFO | 2 +-
PKGBUILD | 28 ++++++++++++----------------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/.SRCINFO b/.SRCINFO
index de1e37a..6af2793 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mrrescue
pkgdesc = An arcade styled 2d action game centered around evacuating civilians from burning buildings.
pkgver = 1.02c
- pkgrel = 1
+ pkgrel = 2
url = http://tangramgames.dk/games/mrrescue/
arch = any
license = CCPL:by-sa
diff --git a/PKGBUILD b/PKGBUILD
index 49a18bc..d13a8b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,32 @@
# Maintainer: Ainola
-# Contributor: Pio
+# Contributors: Pio, carstene1ns
pkgname=mrrescue
pkgver=1.02c
-pkgrel=1
+pkgrel=2
pkgdesc="An arcade styled 2d action game centered around evacuating civilians from burning buildings."
arch=('any')
url="http://tangramgames.dk/games/mrrescue/"
license=('CCPL:by-sa' 'zlib')
depends=('love')
makedepends=('gendesk')
-source=("https://github.com/SimonLarsen/mrrescue/releases/download/v${pkgver}/${pkgname}-${pkgver}.love")
+source=("https://github.com/SimonLarsen/mrrescue/releases/download/v$pkgver/$pkgname-$pkgver.love")
md5sums=('85897f04f2e9c3aaded74bf178aeab4c')
-build() {
+prepare() {
+ cd $srcdir
# Generate desktop file
- cd "${srcdir}"
- gendesk -n
-
+ gendesk -f -n --name "Mr. Rescue" --pkgname "$pkgname" --pkgdesc "$pkgdesc"
# Generate run script
- echo "love /usr/share/mrrescue/mrrescue-${pkgver}.love" > "${pkgname}.sh"
+ echo -e "#!/bin/sh\nexec love /usr/share/$pkgname/$pkgname-$pkgver.love" > $pkgname.sh
}
package() {
# Copy game and license
- cd "${srcdir}" #/${pkgname}-${pkgver}-love"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm644 "${pkgname}-${pkgver}.love" "${pkgdir}/usr/share/${pkgname}/${pkgname}-${pkgver}.love"
- # Extract an image to be used as icon
- unzip -p "${pkgname}-${pkgver}.love" data/splash.png > mrrescue.png
+ install -Dm0644 "$pkgname-$pkgver.love" "$pkgdir"/usr/share/$pkgname/$pkgname-$pkgver.love
+ install -Dm0644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
# Copy desktop file, icon and run script
- install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- install -Dm644 "${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
- install -D "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm0644 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
+ install -Dm0644 data/splash.png "$pkgdir"/usr/share/pixmaps/$pkgname.png
+ install -Dm0755 $pkgname.sh "$pkgdir"/usr/bin/$pkgname
}
--
2.5.1
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.