summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordavedatum2019-11-01 17:47:13 +0000
committerdavedatum2019-11-01 17:47:13 +0000
commit5a2ec06f92e8b3b6486dc3fca8e2f0073a353bc6 (patch)
tree5021e66fb92f82aac078064639438cc15d793687
downloadaur-5a2ec06f92e8b3b6486dc3fca8e2f0073a353bc6.tar.gz
init
-rw-r--r--.SRCINFO26
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD54
-rw-r--r--cabal-desktop.desktop9
-rw-r--r--cabal-desktop.install7
-rwxr-xr-xcabal-desktop.sh4
6 files changed, 109 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6a335ea3b72
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = cabal-desktop-git
+ pkgdesc = Desktop client for Cabal, the p2p/decentralized/local-first chat platform.
+ pkgver = 3.1.1.r11.g23e1c10
+ pkgrel = 1
+ url = https://github.com/cabal-club/cabal-desktop
+ install = cabal-desktop.install
+ arch = x86_64
+ license = AGPL3
+ makedepends = git
+ makedepends = npm
+ makedepends = libicns
+ makedepends = imagemagick
+ depends = electron
+ provides = cabal-desktop-git
+ conflicts = cabal-desktop-git
+ source = cabal-desktop::git+https://github.com/cabal-club/cabal-desktop.git#commit=23e1c107792cfb4c5205d3acdb28a95b8a43cad5
+ source = cabal-desktop.sh
+ source = cabal-desktop.desktop
+ source = cabal-desktop.install
+ md5sums = SKIP
+ md5sums = 8244c7f8e70a73dc0de4beb09e6d06e7
+ md5sums = f0b11be2a1061cbe541c2287b3eb0926
+ md5sums = a5f7c97e76cc1fda971109a050cb6a02
+
+pkgname = cabal-desktop-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..0a1f18b716d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*
+
+!cabal-desktop.desktop
+!cabal-desktop.install
+!cabal-desktop.sh
+!PKGBUILD
+!.SRCINFO
+!.gitignore
+!.git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..44a0f757438
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: davedatum <ask at davedatum dot com>
+
+pkgname=cabal-desktop-git
+_pkgname=cabal-desktop
+pkgver=3.1.1.r11.g23e1c10
+pkgrel=1
+pkgdesc="Desktop client for Cabal, the p2p/decentralized/local-first chat platform."
+arch=("x86_64")
+url="https://github.com/cabal-club/cabal-desktop"
+license=("AGPL3")
+depends=("electron")
+makedepends=("git" "npm" "libicns" "imagemagick")
+provides=("${pkgname}")
+conflicts=("${pkgname}")
+install=${_pkgname}.install
+source=("${_pkgname}::git+$url.git#commit=23e1c107792cfb4c5205d3acdb28a95b8a43cad5"
+ "${_pkgname}.sh"
+ "${_pkgname}.desktop"
+ "${_pkgname}.install")
+md5sums=('SKIP'
+ '8244c7f8e70a73dc0de4beb09e6d06e7'
+ 'f0b11be2a1061cbe541c2287b3eb0926'
+ 'a5f7c97e76cc1fda971109a050cb6a02')
+
+prepare() {
+ sed -i -e '/"scripts": {/a "linux": "npm run build && electron-builder --dir",' "$srcdir/$_pkgname/package.json"
+ icns2png -x -s 1024 "${srcdir}/${_pkgname}/build/icon.icns" -o \
+ "${srcdir}/${_pkgname}/build/"
+}
+
+pkgver() {
+ cd "${_pkgname}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+ npm install && npm run linux
+}
+
+package() {
+ install -Dm755 "${srcdir}/${_pkgname}/dist/linux-unpacked/resources/app.asar" "${pkgdir}/opt/${_pkgname}/app.asar"
+ install -Dm644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+ install -Dm644 "${srcdir}/${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
+
+ install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ for _size in "192x192" "128x128" "96x96" "64x64" "48x48" "32x32" "24x24" "22x22" "20x20" "16x16" "8x8"
+ do
+ install -dm755 "${pkgdir}/usr/share/icons/hicolor/${_size}/apps"
+ convert "${srcdir}/${_pkgname}/build/*.png" \
+ -resize "$_size" "${pkgdir}/usr/share/icons/hicolor/${_size}/apps/${_pkgname}.png"
+ done
+} \ No newline at end of file
diff --git a/cabal-desktop.desktop b/cabal-desktop.desktop
new file mode 100644
index 00000000000..e5502e7d85f
--- /dev/null
+++ b/cabal-desktop.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Cabal Desktop
+Comment=Desktop client for Cabal, the p2p/decentralized/local-first chat platform.
+Exec=/usr/bin/cabal-desktop
+Terminal=false
+Type=Application
+Icon=cabal-desktop
+StartupWMClass=Cabal Desktop
+Categories=GTK;Network; \ No newline at end of file
diff --git a/cabal-desktop.install b/cabal-desktop.install
new file mode 100644
index 00000000000..eeb6462d43d
--- /dev/null
+++ b/cabal-desktop.install
@@ -0,0 +1,7 @@
+post_install() {
+ chmod +x /usr/bin/cabal-desktop
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/cabal-desktop.sh b/cabal-desktop.sh
new file mode 100755
index 00000000000..a9f08002b98
--- /dev/null
+++ b/cabal-desktop.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+# Launch application
+exec electron /opt/cabal-desktop/app.asar "$@" \ No newline at end of file