summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Dowling2018-04-06 01:20:08 +1000
committerRyan Dowling2018-04-06 01:20:08 +1000
commit5dfee260005025ca4a44be0ce39fb398b69a98a7 (patch)
tree15c4f110ffcb5d4c84e2bd93f80f6458645ddcdd
parent74ff8d5982728508908f27a76b03598620fdf5d8 (diff)
downloadaur-5dfee260005025ca4a44be0ce39fb398b69a98a7.tar.gz
refactor: use the app directotry inside the AppImage directly
-rw-r--r--.SRCINFO17
-rw-r--r--Hyper.desktop2
-rw-r--r--PKGBUILD40
-rw-r--r--README.md9
4 files changed, 47 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d88bf03a59c..ef708a56a340 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,22 @@
pkgbase = hyper-appimage
pkgdesc = A terminal built on web technologies
pkgver = 2.0.0.canary.15
- pkgrel = 10
+ pkgrel = 11
url = https://hyper.is
install = hyper-appimage.install
arch = x86_64
license = MIT
conflicts = hyper
provides = hyper
- source_x86_64 = https://github.com/zeit/hyper/releases/download/2.0.0-canary.15/hyper-2.0.0-canary.15-x86_64.AppImage
- source_x86_64 = https://raw.githubusercontent.com/zeit/art/master/hyper/mark/Hyper-Mark-120@3x.png
- source_x86_64 = Hyper.desktop
+ depends = libnotify
+ depends = libxss
+ depends = libxtst
+ depends = gconf
+ depends = libindicator
+ depends = libappindicator
+ noextract = Hyper.AppImage
+ source_x86_64 = Hyper.AppImage::https://github.com/zeit/hyper/releases/download/2.0.0-canary.15/hyper-2.0.0-canary.15-x86_64.AppImage
+ source = Hyper.desktop
md5sums_x86_64 = 53e1b818d3e8f9ff647ab13e1549b55b
- md5sums_x86_64 = f3481e14cba331160339b3b5ab78872b
- md5sums_x86_64 = 1cfb0ca92bb3bebfd95da621c4fa0a84
+ md5sums = 1cfb0ca92bb3bebfd95da621c4fa0a84
pkgname = hyper-appimage
diff --git a/Hyper.desktop b/Hyper.desktop
index 74adb7f4d2b4..8e2da6bc1f10 100644
--- a/Hyper.desktop
+++ b/Hyper.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Hyper
Comment=A terminal build on web technologies
-Exec=env DESKTOPINTEGRATION=0 /opt/hyper-appimage/Hyper.AppImage
+Exec=/opt/hyper-appimage/hyper
Icon=hyper
Terminal=false
Type=Application
diff --git a/PKGBUILD b/PKGBUILD
index 7079943c7359..bf1b7f22c816 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,14 @@
pkgname=hyper-appimage
pkgver=2.0.0.canary.15
-pkgrel=10
+pkgrel=11
pkgdesc="A terminal built on web technologies"
arch=('x86_64')
url="https://hyper.is"
license=('MIT')
conflicts=('hyper')
provides=('hyper')
-depends=()
+depends=('libnotify' 'libxss' 'libxtst' 'gconf' 'libindicator' 'libappindicator')
noextract=('Hyper.AppImage')
install=hyper-appimage.install
options=('!strip')
@@ -17,28 +17,40 @@ options=('!strip')
_pkgver_correct=${pkgver/\.canary/-canary}
source_x86_64=(
- "https://github.com/zeit/hyper/releases/download/${_pkgver_correct}/hyper-${_pkgver_correct}-x86_64.AppImage"
- "https://raw.githubusercontent.com/zeit/art/master/hyper/mark/Hyper-Mark-120@3x.png"
- "Hyper.desktop"
+ "Hyper.AppImage::https://github.com/zeit/hyper/releases/download/${_pkgver_correct}/hyper-${_pkgver_correct}-x86_64.AppImage"
)
md5sums_x86_64=(
'53e1b818d3e8f9ff647ab13e1549b55b'
- 'f3481e14cba331160339b3b5ab78872b'
+)
+
+source=(
+ "Hyper.desktop"
+)
+
+md5sums=(
'1cfb0ca92bb3bebfd95da621c4fa0a84'
)
+prepare() {
+ # extract the AppImage
+ "./${srcdir}/hyper-${_pkgver_correct}-x86_64.AppImage" --appimage-extract
+}
+
package() {
- # Install the main files.
- install -D -m755 "${srcdir}/hyper-${_pkgver_correct}-x86_64.AppImage" "${pkgdir}/opt/${pkgname}/Hyper.AppImage"
+ # install the main files.
+ install -d "${pkgdir}/opt/${pkgname}"
+ install "${srcdir}/squashfs-root/app/*" "${pkgdir}/opt/${pkgname}"
+
+ # make sure the main binary has the right permissions
+ chmod 0755 "${pkgdir}/opt/${pkgname}/hyper"
- # Desktop Entry
+ # desktop entry
install -D "${srcdir}/Hyper.desktop" "${pkgdir}/usr/share/applications/Hyper.desktop"
- # Main binary
- install -d "${pkgdir}/usr/bin"
- ln -s "/opt/${pkgname}/Hyper.AppImage" "${pkgdir}/usr/bin/hyper"
+ # link the binary
+ ln -s "${pkgdir}/opt/${pkgname}/hyper" "/usr/bin/hyper"
- # Install the icon
- install -D "${srcdir}/Hyper-Mark-120@3x.png" "${pkgdir}/usr/share/pixmaps/Hyper.png"
+ # install the icons
+ install "${srcdir}/squashfs-root/usr/share/icons/hicolor/*" "${pkgdir}/usr/share/icons/hicolor"
}
diff --git a/README.md b/README.md
index 03be34a7ecad..fdcbab2db024 100644
--- a/README.md
+++ b/README.md
@@ -9,3 +9,12 @@ Based on the existing [upwork-appimage](https://aur.archlinux.org/packages/upwor
The `hyper` package from AUR installs NPM, Yarn, NodeJS and Electron just to install, which is not
ideal for me as I want to control my own versions of those softwares and not have one package
pollute that.
+
+## How does it work?
+
+This works by downloading the AppImage distribution for Hyper and then extracting the `app/`
+directory out of that (which contains fully working binary).
+
+This means we don't need to compile the application and can just use it out of the AppImage.
+
+This may not be as intended, but sure works a treat.