]> git.lizzy.rs Git - cryptomail-electron.git/commitdiff
Initial commit master
authorLizzy Fleckenstein <eliasfleckenstein@web.de>
Sun, 11 Dec 2022 18:08:14 +0000 (19:08 +0100)
committerLizzy Fleckenstein <eliasfleckenstein@web.de>
Sun, 11 Dec 2022 18:08:14 +0000 (19:08 +0100)
.gitignore [new file with mode: 0644]
PKGBUILD [new file with mode: 0644]
backend.js [new file with mode: 0644]
cryptomail-electron.desktop [new file with mode: 0644]
cryptomail-electron.sh [new file with mode: 0755]
package.json [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..d5299e3
--- /dev/null
@@ -0,0 +1,3 @@
+pkg
+src
+*.pkg.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644 (file)
index 0000000..8db6f86
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+pkgname=cryptomail-electron
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Cryptomail desktop client"
+arch=(any)
+url=https://lantern.uber.space/main.html
+license=(GPL3)
+depends=(electron)
+makedepends=(wget)
+source=(backend.js package.json cryptomail-electron.sh cryptomail-electron.desktop)
+sha512sums=(SKIP SKIP SKIP SKIP)
+
+build() {
+       mkdir -p app
+       cp backend.js package.json app
+       cd app
+       wget -N "https://lantern.uber.space/"{main.html,style.css,sodium.js,main.js,Ubuntu-Regular.ttf,Ubuntu-Bold.ttf,UbuntuMono-Regular.ttf}
+}
+
+package() {
+       mkdir -p "$pkgdir"/usr/{bin,lib,share/applications}/
+
+       cp -r "$srcdir"/app "$pkgdir"/usr/lib/"$pkgname"
+
+       install -Dm755 "$srcdir"/cryptomail-electron.sh "$pkgdir"/usr/bin/"$pkgname"
+       install -Dm755 "$srcdir"/cryptomail-electron.desktop "$pkgdir"/usr/share/applications/
+
+}
diff --git a/backend.js b/backend.js
new file mode 100644 (file)
index 0000000..92a5ea4
--- /dev/null
@@ -0,0 +1,12 @@
+const { app, BrowserWindow } = require("electron")
+
+app.whenReady().then(_ => {
+       new BrowserWindow({
+               width: 800,
+               height: 600
+       }).loadFile("main.html")
+})
+
+app.on("window-all-closed", _ => {
+       app.quit()
+})
diff --git a/cryptomail-electron.desktop b/cryptomail-electron.desktop
new file mode 100644 (file)
index 0000000..c0dea39
--- /dev/null
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=cryptomail-electron
+Comment=Cryptomail desktop client
+Exec=cryptomail-electron
+Type=Application
+Categories=Network;Chat;InstantMessaging;P2P
diff --git a/cryptomail-electron.sh b/cryptomail-electron.sh
new file mode 100755 (executable)
index 0000000..7d2bbe8
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron /usr/lib/cryptomail-electron "$@"
diff --git a/package.json b/package.json
new file mode 100644 (file)
index 0000000..e321988
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "main": "backend.js"
+}