summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSophie 'Sharky' Schumann2020-06-18 17:15:41 +0200
committerSophie 'Sharky' Schumann2020-06-18 17:15:41 +0200
commit41c2db39007d6da53310218e829cb7b2a362633b (patch)
treeb68c990d52a5e14b730d9780dac3cb1adfd29fc1
downloadaur-41c2db39007d6da53310218e829cb7b2a362633b.tar.gz
init
-rw-r--r--.SRCINFO44
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD116
-rw-r--r--revolution-desktop.desktop10
-rw-r--r--revolution-desktop.sh5
5 files changed, 180 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8b212c70c423
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,44 @@
+pkgbase = revolution-desktop-git
+ pkgdesc = A glossy Matrix collaboration client for the desktop.
+ pkgver = r9235.99ae606c
+ pkgrel = 1
+ url = https://gitlab.eastcoast.hosting/ponies/riot-web
+ 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 = riot-desktop
+ backup = etc/revolution/config.json
+ source = matrix-js-sdk::git+https://gitlab.eastcoast.hosting/ponies/matrix-js-sdk.git
+ source = matrix-react-sdk::git+https://gitlab.eastcoast.hosting/ponies/matrix-react-sdk.git
+ source = riot-web::git+https://gitlab.eastcoast.hosting/ponies/riot-web.git
+ source = riot-desktop::git+https://gitlab.eastcoast.hosting/ponies/riot-desktop.git
+ source = revolution-desktop.desktop
+ source = revolution-desktop.sh
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 822db5d897392092db26a12331d6800983061094f2626a47d33c323ac206aac8
+ sha256sums = 88e1ffc56fe389c5e692ce247243961ac827126f3da50aa591a1a8c792cfd896
+
+pkgname = revolution-web-git
+ pkgdesc = Glossy Matrix collaboration client for the web.
+ provides = vector-web
+ replaces = vector-web
+
+pkgname = revolution-desktop-git
+ pkgdesc = Glossy Matrix collaboration client for the desktop.
+ depends = revolution-web-git=r9235.99ae606c
+ depends = electron
+ depends = sqlcipher
+ backup = etc/revolution/config.json
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..450448950da2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+src/
+pkg/
+riot-desktop/
+riot-web/
+*.tar.xz \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..efef873104c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,116 @@
+pkgbase=revolution-desktop-git
+pkgver=r9235.99ae606c
+pkgrel=1
+pkgname=(revolution-web-git revolution-desktop-git)
+pkgdesc="A glossy Matrix collaboration client for the desktop."
+arch=('x86_64')
+url="https://gitlab.eastcoast.hosting/ponies/riot-web"
+license=('Apache')
+depends=('electron')
+makedepends=('git' 'nodejs' 'jq' 'yarn' 'npm' 'python' 'rust' 'sqlcipher' 'electron')
+provides=('riot-desktop')
+backup=("etc/revolution/config.json")
+_giturl='git+https://gitlab.eastcoast.hosting/ponies'
+source=("matrix-js-sdk::${_giturl}/matrix-js-sdk.git"
+ "matrix-react-sdk::${_giturl}/matrix-react-sdk.git"
+ "riot-web::${_giturl}/riot-web.git"
+ "riot-desktop::${_giturl}/riot-desktop.git"
+ "revolution-desktop.desktop"
+ "revolution-desktop.sh")
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ '822db5d897392092db26a12331d6800983061094f2626a47d33c323ac206aac8'
+ '88e1ffc56fe389c5e692ce247243961ac827126f3da50aa591a1a8c792cfd896'
+)
+
+pkgver() {
+ cd "$srcdir/riot-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 riot-desktop
+ # Switch target to output to directory rather than .deb package
+ # @todo this needs to be fixed
+ sed -i 's/"target": "deb"/"target": "dir"/g' package.json
+ sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' riot.im/release/config.json
+
+ cd ../riot-web
+ # Disable auto updating
+ sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' riot.im/app/config.json
+}
+
+build() {
+ cd matrix-js-sdk
+ yarn install
+ yarn build
+ yarn link
+ cd ..
+
+ cd matrix-react-sdk
+ yarn install
+ yarn build
+ yarn link
+ cd ..
+
+ cd riot-web
+ yarn link matrix-js-sdk
+ yarn link matrix-react-sdk
+ yarn install
+ yarn build
+
+ cd ../riot-desktop
+ yarn install
+ yarn run build:native
+ yarn add electron
+ yarn run build
+}
+
+package_revolution-web-git() {
+ pkgdesc="Glossy Matrix collaboration client for the web."
+ provides=(vector-web)
+ replaces=(vector-web)
+
+ cd riot-web
+
+ install -d "${pkgdir}"/{usr/share/webapps,etc/webapps}/revolution
+
+ cp -r webapp/* "${pkgdir}"/usr/share/webapps/revolution/
+ install -Dm644 config.sample.json -t "${pkgdir}"/etc/webapps/revolution/
+ ln -s /etc/webapps/revolution/config.json "${pkgdir}"/usr/share/webapps/revolution/
+ echo "${pkgver}" > "${pkgdir}"/usr/share/webapps/revolution/version
+}
+
+package_revolution-desktop-git() {
+ pkgdesc="Glossy Matrix collaboration client for the desktop."
+ depends=("revolution-web-git=${pkgver}" electron sqlcipher)
+ backup=('etc/revolution/config.json')
+
+ cd riot-desktop
+
+ install -d "${pkgdir}"{/usr/lib/revolution,/etc/webapps/revolution}
+
+ # Install the app content, replace the webapp with a symlink to the system package
+ cp -r dist/linux-unpacked/resources/* "${pkgdir}"/usr/lib/revolution/
+ ln -s /usr/share/webapps/revolution "${pkgdir}"/usr/lib/revolution/webapp
+
+ # Config file
+ ln -s /etc/revolution/config.json "${pkgdir}"/etc/webapps/revolution/config.json
+ install -Dm644 riot.im/release/config.json -t "${pkgdir}"/etc/revolution/
+
+ # Required extras
+ install -Dm644 ../revolution-desktop.desktop "${pkgdir}"/usr/share/applications/revolution-desktop.desktop
+ install -Dm755 ../revolution-desktop.sh "${pkgdir}"/usr/bin/revolution-desktop
+
+ # Icons
+ install -Dm644 ../riot-web/res/themes/riot/img/logos/riot-im-logo.svg "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/revolution.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/revolution.png
+ done
+}
diff --git a/revolution-desktop.desktop b/revolution-desktop.desktop
new file mode 100644
index 000000000000..7f7c30fe5dca
--- /dev/null
+++ b/revolution-desktop.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Revolution-Desktop
+Comment=A feature-rich client for Matrix.org
+Exec=/usr/bin/revolution-desktop %u
+Terminal=false
+Type=Application
+Icon=riot
+StartupWMClass=Revolution
+Categories=Network;InstantMessaging;Chat;IRCClient
+MimeType=x-scheme-handler/revolution;
diff --git a/revolution-desktop.sh b/revolution-desktop.sh
new file mode 100644
index 000000000000..3b38eb8d9730
--- /dev/null
+++ b/revolution-desktop.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# Original by Bruno Pagani (a.k.a. ArchangeGabriel) <archange@archlinux.org>
+
+exec electron /usr/lib/revolution/app.asar "$@"