summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGenesis2019-12-11 11:30:21 +0100
committerGenesis2019-12-11 11:30:21 +0100
commit7a510d219ba616d9304eb8498ad9a34cf9e35fd8 (patch)
treefbdc7d29e72c362a7443fe2fef2009fb12712260
parent6f4c1d7a3a106fb4b54f92f65bc2a5263ef46faf (diff)
downloadaur-7a510d219ba616d9304eb8498ad9a34cf9e35fd8.tar.gz
Fix launcher auto-updater
- Changed installation directory from /opt/appimages to /opt/ankama-launcher - Added post-install and post-upgrade instructions to add current user to the "games" group in order to make the launcher auto-updater work - Added post-remove instructions to help clean out all the leftover files after removing the package
-rw-r--r--PKGBUILD17
-rw-r--r--ankama-launcher2
-rw-r--r--ankama-launcher.install35
3 files changed, 44 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 18462de9fd1..0123c6d478c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,14 @@
# Maintainer: Genesis <tofupedia.fr@gmail.com>
-# To disable the popup asking for system integration at each startup :
-# `touch $HOME/.local/share/appimagekit/no_desktopintegration`
-
pkgname=ankama-launcher
pkgver=2.10.31
-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')
+install='ankama-launcher.install'
depends=('zlib' 'bash')
makedepends=('p7zip')
optdepends=('wine: to play Dofus'
@@ -19,7 +17,7 @@ options=('!strip')
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=('f86043ac6089eddc756942c15a555179')
+md5sums=('e6a225e04a4a4105059af02873cf65a5')
md5sums_i686=('64c1dd6b072d3d95b9c38bd6e60eec61')
md5sums_x86_64=('3793bfded627af12e6062895a4604649')
@@ -37,8 +35,9 @@ prepare() {
}
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"
+ install -dm775 -ggames "${pkgdir}/opt/ankama-launcher"
+ install -Dm775 -ggames "ankama-launcher.AppImage" "${pkgdir}/opt/ankama-launcher/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
index c4b42ffd774..5992842762a 100644
--- a/ankama-launcher
+++ b/ankama-launcher
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
-exec /opt/appimages/ankama-launcher.AppImage
+exec /opt/ankama-launcher/ankama-launcher.AppImage
diff --git a/ankama-launcher.install b/ankama-launcher.install
new file mode 100644
index 00000000000..32fc933a836
--- /dev/null
+++ b/ankama-launcher.install
@@ -0,0 +1,35 @@
+post_install() {
+ chgrp -R games /opt/ankama-launcher
+ chmod -R g+w /opt/ankama-launcher
+
+ cat <<END
+
+The launcher files are installed under the group "games". Please add your user
+to this group with "usermod -a -G games", otherwise the launcher will not be able to
+auto-update itself properly.
+
+To disable the popup asking for system integration at each startup, execute
+"touch \$HOME/.local/share/appimagekit/no_desktopintegration".
+
+END
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ cat <<END
+
+The launcher has been removed, but the files and games it installed are still there. If you want to
+remove the launcher completely, have a look at the directories used
+by the launcher and remove them :
+- \$HOME/.config/Ankama/zaap
+- \$HOME/.config/zaap
+- \$HOME/.config/Dofus\\ Retro
+- \$HOME/.cache/zaap-updater
+Also, some games are using Wine, you might want to also take a look at your default Wine
+installation directory as there might also be leftover files there.
+
+END
+}