diff options
author | Genesis | 2019-11-05 10:55:01 +0100 |
---|---|---|
committer | Genesis | 2019-11-05 10:55:01 +0100 |
commit | 1fdda3936449f06b763172921a7affb0da292c21 (patch) | |
tree | 4e972108a24385b7529b70234bd0a05c718334d9 | |
parent | 0edec7714f8126a3c6f1b44712bebe9f2144e7f7 (diff) | |
download | aur-1fdda3936449f06b763172921a7affb0da292c21.tar.gz |
Improve PKGBUILD
- Remove .desktop file patch and replace it with searches and replaces
using `sed`
- Add a bash script in /usr/bin to run the AppImage from the terminal
- The .desktop file now calls the bash script to run the AppImage
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | ankama-launcher | 3 | ||||
-rw-r--r-- | ankama-launcher.desktop.patch | 14 |
4 files changed, 19 insertions, 28 deletions
@@ -1,18 +1,20 @@ pkgbase = ankama-launcher pkgdesc = A multi-game portal for all Ankama games. pkgver = 2.10.24 - pkgrel = 1 + pkgrel = 2 url = https://www.ankama.com/en/launcher arch = i686 arch = x86_64 license = custom:Ankama License + makedepends = p7zip depends = zlib + depends = bash optdepends = wine: to play Dofus optdepends = java-environment: to play Wakfu options = !strip - source = ankama-launcher.desktop.patch - md5sums = 7a78ebe882f8044746b83e1adf827640 - source_i686 = ankama-launcher-2.10.24-i386.AppImage::https://ankama.akamaized.net/zaap/installers/production/Ankama%20Launcher-Setup-i386.AppImage + source = ankama-launcher + md5sums = f86043ac6089eddc756942c15a555179 + source_i686 = ankama-launcher-2.10.24-i686.AppImage::https://ankama.akamaized.net/zaap/installers/production/Ankama%20Launcher-Setup-i386.AppImage md5sums_i686 = da39331fe03fedd0d483a4ac7a41cfc6 source_x86_64 = ankama-launcher-2.10.24-x86_64.AppImage::https://ankama.akamaized.net/zaap/installers/production/Ankama%20Launcher-Setup-x86_64.AppImage md5sums_x86_64 = 59b3fe382bab6b7e1f1c3195f3407fb7 @@ -5,40 +5,40 @@ pkgname=ankama-launcher pkgver=2.10.24 -pkgrel=1 +pkgrel=2 pkgdesc='A multi-game portal for all Ankama games.' url='https://www.ankama.com/en/launcher' arch=('i686' 'x86_64') license=('custom:Ankama License') -depends=('zlib') +depends=('zlib' 'bash') +makedepends=('p7zip') optdepends=('wine: to play Dofus' 'java-environment: to play Wakfu') options=('!strip') -source=('ankama-launcher.desktop.patch') -source_i686=("${pkgname}-${pkgver}-i386.AppImage::https://ankama.akamaized.net/zaap/installers/production/Ankama%20Launcher-Setup-i386.AppImage") +source=('ankama-launcher') +source_i686=("${pkgname}-${pkgver}-i686.AppImage::https://ankama.akamaized.net/zaap/installers/production/Ankama%20Launcher-Setup-i386.AppImage") source_x86_64=("${pkgname}-${pkgver}-x86_64.AppImage::https://ankama.akamaized.net/zaap/installers/production/Ankama%20Launcher-Setup-x86_64.AppImage") -md5sums=('7a78ebe882f8044746b83e1adf827640') +md5sums=('f86043ac6089eddc756942c15a555179') md5sums_i686=('da39331fe03fedd0d483a4ac7a41cfc6') md5sums_x86_64=('59b3fe382bab6b7e1f1c3195f3407fb7') -[[ "$CARCH" == "i686" ]] && LARCH='i386' -[[ "$CARCH" == "x86_64" ]] && LARCH='x86_64' - prepare() { cd "${srcdir}" - mv "${pkgname}-${pkgver}-${LARCH}.AppImage" "ankama-launcher.AppImage" + mv "${pkgname}-${pkgver}-${CARCH}.AppImage" "ankama-launcher.AppImage" 7z e "${srcdir}/ankama-launcher.AppImage" "zaap.desktop" 7z e "${srcdir}/ankama-launcher.AppImage" "usr/share/icons/hicolor/128x128/apps/zaap.png" mv "zaap.desktop" "ankama-launcher.desktop" mv "zaap.png" "ankama-launcher.png" - patch -Np0 <../ankama-launcher.desktop.patch + sed -i "s/^Exec=AppRun$/Exec=${pkgname}/" "ankama-launcher.desktop" + sed -i "s/^Icon=zaap$/Icon=ankama-launcher/" "ankama-launcher.desktop" } package() { install -Dm755 "ankama-launcher.AppImage" "${pkgdir}/opt/appimages/ankama-launcher.AppImage" + install -Dm755 "ankama-launcher" "${pkgdir}/usr/bin/ankama-launcher" install -Dm644 "ankama-launcher.desktop" "${pkgdir}/usr/share/applications/ankama-launcher.desktop" install -Dm644 "ankama-launcher.png" "${pkgdir}/usr/share/pixmaps/ankama-launcher.png" } diff --git a/ankama-launcher b/ankama-launcher new file mode 100644 index 00000000000..c4b42ffd774 --- /dev/null +++ b/ankama-launcher @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +exec /opt/appimages/ankama-launcher.AppImage diff --git a/ankama-launcher.desktop.patch b/ankama-launcher.desktop.patch deleted file mode 100644 index b391b30c82c..00000000000 --- a/ankama-launcher.desktop.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ankama-launcher.desktop 2019-09-17 09:45:19.000000000 +0200 -+++ ankama-launcher.desktop 2019-09-18 19:03:36.315228039 +0200 -@@ -1,9 +1,9 @@ - [Desktop Entry] - Name=Ankama Launcher --Exec=AppRun -+Exec=/opt/appimages/ankama-launcher.AppImage - Terminal=false - Type=Application --Icon=zaap -+Icon=ankama-launcher - StartupWMClass=Ankama Launcher - X-AppImage-Version=2.10.0.5277 - Comment=Ankama portal and game launcher |