summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Mason2020-07-18 13:05:17 +1200
committerDaniel Mason2020-07-18 14:27:35 +1200
commitcd65fd459f36519e42514e1ed4838d5c1c8657e4 (patch)
treeb73e8b18c3e7b7380be1d3daa32156131946c2aa
downloadaur-cd65fd459f36519e42514e1ed4838d5c1c8657e4.tar.gz
Initial Commit V1.7.1
-rw-r--r--.SRCINFO40
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD99
-rw-r--r--element-desktop.desktop10
-rw-r--r--element-desktop.sh3
5 files changed, 158 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7ca32e4d5bc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,40 @@
+pkgbase = element-desktop-git
+ pkgdesc = A glossy Matrix collaboration client for the desktop.
+ pkgver = v1.7.1.r0.g9c9da434
+ pkgrel = 1
+ url = https://element.io
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = nodejs
+ makedepends = jq
+ makedepends = yarn
+ makedepends = npm
+ makedepends = python
+ makedepends = rust
+ makedepends = sqlcipher
+ makedepends = electron
+ depends = electron
+ provides = element-desktop
+ backup = etc/element/config.json
+ source = element-web::git://github.com/vector-im/riot-web.git#tag=v1.7.1
+ source = element-desktop::git://github.com/vector-im/riot-desktop.git#tag=v1.7.1
+ source = element-desktop.desktop
+ source = element-desktop.sh
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 81354e663e354bd66b3f2bb303314b790bdf6d61c3d8e2df7407eb500885647d
+ sha256sums = e4965abefbd609cf88349437b811bc4433d671f5ec5cd51992fd6179d483925f
+
+pkgname = element-web-git
+ pkgdesc = Glossy Matrix collaboration client for the web.
+ provides = vector-web
+ replaces = vector-web
+
+pkgname = element-desktop-git
+ pkgdesc = Glossy Matrix collaboration client for the desktop.
+ depends = element-web-git=v1.7.1.r0.g9c9da434
+ depends = electron
+ depends = sqlcipher
+ backup = etc/element/config.json
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..e47f1076aac
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+src/
+pkg/
+element-desktop/
+element-web/
+*.tar.xz
+*.tar.zst \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..513adb4ff69
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,99 @@
+# Owner: Daniel Mason (idanoo) <daniel@m2.nz>
+pkgbase=element-desktop-git
+_vers=v1.7.1
+pkgver=v1.7.1.r0.g9c9da434
+pkgrel=1
+pkgname=(element-web-git element-desktop-git)
+pkgdesc="A glossy Matrix collaboration client for the desktop."
+arch=('x86_64')
+url="https://element.io"
+license=('Apache')
+depends=('electron')
+makedepends=('git' 'nodejs' 'jq' 'yarn' 'npm' 'python' 'rust' 'sqlcipher' 'electron')
+provides=('element-desktop')
+backup=("etc/element/config.json")
+_giturl='git://github.com/vector-im'
+source=("element-web::${_giturl}/riot-web.git#tag=${_vers}"
+ "element-desktop::${_giturl}/riot-desktop.git#tag=${_vers}"
+ "element-desktop.desktop"
+ "element-desktop.sh")
+sha256sums=('SKIP'
+ 'SKIP'
+ '81354e663e354bd66b3f2bb303314b790bdf6d61c3d8e2df7407eb500885647d'
+ 'e4965abefbd609cf88349437b811bc4433d671f5ec5cd51992fd6179d483925f')
+
+pkgver() {
+ cd "$srcdir/element-web"
+
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd element-desktop
+ # Switch target to output to directory rather than .deb package
+ sed -i 's/"target": "deb"/"target": "dir"/g' package.json
+ sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/release/config.json
+ yarn install
+
+ cd ../element-web
+ # Disable auto updating
+ sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' element.io/app/config.json
+
+ yarn install
+}
+
+build() {
+ cd element-web
+ yarn build
+
+ cd ../element-desktop
+ yarn run build:native
+ yarn run build
+}
+
+package_element-web-git() {
+ pkgdesc="Glossy Matrix collaboration client for the web."
+ provides=(vector-web)
+ replaces=(vector-web)
+
+ cd element-web
+
+ install -d "${pkgdir}"/{usr/share/webapps,etc/webapps}/element
+
+ cp -r webapp/* "${pkgdir}"/usr/share/webapps/element/
+ install -Dm644 config.sample.json -t "${pkgdir}"/etc/webapps/element/
+ ln -s /etc/webapps/element/config.json "${pkgdir}"/usr/share/webapps/element/
+ echo "${pkgver}" > "${pkgdir}"/usr/share/webapps/element/version
+}
+
+package_element-desktop-git() {
+ pkgdesc="Glossy Matrix collaboration client for the desktop."
+ depends=("element-web-git=${pkgver}" electron sqlcipher)
+ backup=('etc/element/config.json')
+
+ cd element-desktop
+
+ install -d "${pkgdir}"{/usr/lib/element,/etc/webapps/element}
+
+ # Install the app content, replace the webapp with a symlink to the system package
+ cp -r dist/linux-unpacked/resources/* "${pkgdir}"/usr/lib/element/
+ ln -s /usr/share/webapps/element "${pkgdir}"/usr/lib/element/webapp
+
+ # Config file
+ ln -s /etc/element/config.json "${pkgdir}"/etc/webapps/element/config.json
+ install -Dm644 element.io/release/config.json -t "${pkgdir}"/etc/element/
+
+ # Required extras
+ install -Dm644 ../element-desktop.desktop "${pkgdir}"/usr/share/applications/element-desktop.desktop
+ install -Dm755 ../element-desktop.sh "${pkgdir}"/usr/bin/element-desktop
+
+ # Icons
+ install -Dm644 ../element-web/res/themes/element/img/logos/element-logo.svg "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/element.svg
+
+ for i in 16 24 48 64 96 128 256 512; do
+ install -Dm644 build/icons/${i}x${i}.png "${pkgdir}"/usr/share/icons/hicolor/${i}x${i}/apps/element.png
+ done
+} \ No newline at end of file
diff --git a/element-desktop.desktop b/element-desktop.desktop
new file mode 100644
index 00000000000..64768f92bce
--- /dev/null
+++ b/element-desktop.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Element-Desktop
+Comment=A feature-rich client for Matrix.org
+Exec=/usr/bin/element-desktop %u
+Terminal=false
+Type=Application
+Icon=element
+StartupWMClass=Element
+Categories=Network;InstantMessaging;Chat;IRCClient
+MimeType=x-scheme-handler/riot;x-scheme-handler/element;
diff --git a/element-desktop.sh b/element-desktop.sh
new file mode 100644
index 00000000000..165a87f35d7
--- /dev/null
+++ b/element-desktop.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec electron /usr/lib/element/app.asar "$@"