summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJose Marino2018-01-15 09:33:14 -0700
committerJose Marino2018-01-15 09:33:14 -0700
commitea7239f92eab9c04ec3539801bf80e07eeb5b70c (patch)
tree78248ebae8cfd2ab7e14f9bb97825a9cec0c4f53 /PKGBUILD
downloadaur-ea7239f92eab9c04ec3539801bf80e07eeb5b70c.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..04489ed5707c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Jose Marino <jose.marino <at> gmail <dot> com>
+# NOTE (Jose): I have no idea how to properly build an electron application.
+# The easiest way I could figure out was to extract the binary
+# from the AppImage package.
+
+pkgname=inboxer
+pkgver=1.0.1
+pkgrel=1
+pkgdesc="Unofficial, free and open-source Google Inbox Desktop App"
+arch=('x86_64')
+url="https://denysdovhan.com/inboxer/"
+license=('MIT')
+depends=('nss>=3 gtk2')
+makedepends=('')
+checkdepends=()
+optdepends=()
+options=()
+install=
+source=("https://github.com/denysdovhan/inboxer/releases/download/v${pkgver}/inboxer-${pkgver}-x86_64.AppImage"
+ "inboxer.sh")
+sha256sums=('c419f6b51be82dfb35e1f1b2c7954998accfdd4c8ec90857fc49fac7c205fcb2'
+ 'ec740d8e9aa0ae6485a0ca44e5bbee959337ca414d40478d3e420abf22522544')
+validpgpkeys=()
+
+prepare() {
+ chmod u+x inboxer-${pkgver}-x86_64.AppImage
+ ./inboxer-${pkgver}-x86_64.AppImage --appimage-extract > /dev/null 2>&1
+ # Set directory permissions to drwxr-xr-x
+ find squashfs-root -type d -exec chmod 755 {} \;
+
+ # fix .desktop file: executable and categories
+ sed -i -e "s/Exec=.*/Exec=inboxer/" squashfs-root/inboxer.desktop
+ sed -i -e "s/Categories=.*/Categories=Network;Email/" squashfs-root/inboxer.desktop
+}
+
+package() {
+ install -D inboxer.sh -t "${pkgdir}/opt/${pkgname}/"
+ install -Dm644 squashfs-root/inboxer.desktop -t "${pkgdir}/usr/share/applications/"
+ cp -a --no-preserve=ownership squashfs-root/app/* "${pkgdir}/opt/${pkgname}/"
+ cp -a --no-preserve=ownership squashfs-root/usr/lib "${pkgdir}/opt/${pkgname}/"
+ cp -a --no-preserve=ownership squashfs-root/usr/share/icons "${pkgdir}/usr/share/"
+
+ # modify installation folder in executable script
+ sed -i -e "s_@FOLDER@_/opt/${pkgname}_" "${pkgdir}/opt/${pkgname}/inboxer.sh"
+
+ # create executable link
+ install -d "${pkgdir}/usr/bin/"
+ ln -sf "/opt/${pkgname}/inboxer.sh" "${pkgdir}/usr/bin/inboxer"
+}