summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJean Lucas2019-08-02 05:02:24 -0400
committerJean Lucas2019-08-02 05:02:24 -0400
commit7abe0a29de2acbb7ec31c7411b80e836e184087a (patch)
tree6af550e8a3da99b9a73b82792eeae61d7b6e2da3 /PKGBUILD
downloadaur-7abe0a29de2acbb7ec31c7411b80e836e184087a.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e06436c727a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Contributor: Jean Lucas <jean@4ray.co>
+
+pkgname=zulip-desktop-git
+pkgver=3.1.0+beta+r34+g47b729c
+pkgrel=1
+pkgdesc='Real-time team chat based on the email threading model (git)'
+arch=(i686 x86_64)
+url=https://zulipchat.com
+license=(Apache)
+depends=(alsa-lib atk at-spi2-atk cairo dbus fontconfig gdk-pixbuf2 glib2 gtk3 hicolor-icon-theme libcups libxcomposite libxcursor libxdamage libxext libxfixes libxi libxkbfile libxrandr libxrender libxss libxtst nspr nss pango)
+makedepends=(git npm python2 libxkbfile typescript)
+provides=(zulip-desktop)
+conflicts=(zulip-desktop zulip-desktop-bin)
+source=(git+https://github.com/zulip/${pkgname/-git/}
+ zulip.desktop)
+sha512sums=('SKIP'
+ '7696a6874d17957f99452452723ae1a6b32b6814b018361a71ed1fe0191e1c6da6f3ad693e2e279615e74f687c380ff2f6dab8b69fcd82476e8f33b56a6b4cb5')
+
+pkgver() {
+ cd ${pkgname/-git/}
+ git describe --tags | sed 's#v##;s#-#+#g;s#+\([0-9]\)#+r\1#'
+}
+
+prepare() {
+ # We need an API key for Sentry, so let's not use it
+ sed -i 's#!isDev#isDev#' ${pkgname/-git/}/app/renderer/js/utils/sentry-util.ts
+}
+
+build() {
+ cd ${pkgname/-git/}
+ npm i
+ tsc
+ npx electron-builder --dir
+}
+
+package() {
+ install -Dm 644 zulip.desktop -t "$pkgdir"/usr/share/applications
+
+ cd ${pkgname/-git/}
+
+ mkdir "$pkgdir"/usr/{lib,bin}
+ cp -a dist/linux-unpacked "$pkgdir"/usr/lib/${pkgname/-git/}
+ ln -s /usr/lib/${pkgname/-git/}/zulip "$pkgdir"/usr/bin
+
+ for i in 16 24 32 48 64 96 128 256 512; do
+ install -Dm 644 build/icons/${i}x${i}.png \
+ "$pkgdir"/usr/share/icons/hicolor/${i}x${i}/apps/zulip.png
+ done
+
+ install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/zulip-desktop
+}