summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheAssassin2018-04-25 04:22:15 +0200
committerTheAssassin2018-04-25 04:22:15 +0200
commit825f10dbebe082a978f3d353f81cc2a750683905 (patch)
tree4ccd19e7aabf5db6f323f988d27a21313b865040
parent393967c15d154c65c175a9e9e1913cf43953920a (diff)
downloadaur-825f10dbebe082a978f3d353f81cc2a750683905.tar.gz
Add postinstall and preremove scripts
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD1
-rw-r--r--appimagelauncher.install9
3 files changed, 11 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f54747431ee5..54e47de0eb4d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,6 +3,7 @@ pkgbase = appimagelauncher-git
pkgver = 1alpha+git20180425.e530df7
pkgrel = 1
url = https://github.com/TheAssassin/AppImageLauncher
+ install = appimagelauncher.install
arch = x86_64
license = MIT
makedepends = git
diff --git a/PKGBUILD b/PKGBUILD
index a2b111e3affd..e85f784a1266 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,6 +13,7 @@ depends=('qt5-base' 'fuse' 'cairo' 'binutils' 'desktop-file-utils' 'shared-mime-
makedepends=('git' 'cmake' 'wget' 'vim' 'binfmt-support')
source=("git://github.com/TheAssassin/$_pkgname#tag=continuous")
sha256sums=('SKIP')
+install=appimagelauncher.install
pkgver() {
cd "$srcdir/$_pkgname"
diff --git a/appimagelauncher.install b/appimagelauncher.install
new file mode 100644
index 000000000000..c9f85b2a9ab9
--- /dev/null
+++ b/appimagelauncher.install
@@ -0,0 +1,9 @@
+post_install() {
+ echo "Installing AppImageLauncher as interpreter for AppImages"
+ (set -x; update-binfmts --package appimage --install appimage-type2 /usr/bin/AppImageLauncher --magic 'AI\x02' --offset 8)
+}
+
+pre_remove() {
+ echo "Removing AppImageLauncher as interpreter for AppImages"
+ (set -x; update-binfmts --package appimage --remove appimage-type2 /usr/bin/AppImageLauncher)
+}