summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrecht Serckx2018-10-23 16:42:01 +0200
committerBrecht Serckx2018-10-23 16:42:01 +0200
commit03834c81cc92830c1f886a30bee8103f3bd88b5e (patch)
treef1f2939e7d4693d943c5273ac2f4d282d08125c4
downloadaur-03834c81cc92830c1f886a30bee8103f3bd88b5e.tar.gz
initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD48
-rw-r--r--rambox-os.desktop12
-rw-r--r--rambox-os.js29
4 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7ef43217b363
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = rambox-os-git
+ pkgdesc = Free and Open Source messaging and emailing app that combines common web applications into one.
+ pkgver = r989.821e3f5
+ pkgrel = 1
+ url = https://github.com/TheGoddessInari/rambox
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = desktop-file-utils
+ makedepends = ruby
+ makedepends = npm
+ makedepends = sencha-cmd-6
+ depends = electron
+ provides = rambox-os
+ conflicts = rambox-os
+ conflicts = rambox
+ conflicts = rambox-bin
+ source = rambox-os::git+https://github.com/TheGoddessInari/rambox.git
+ md5sums = SKIP
+
+pkgname = rambox-os-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9f01053975e7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: denbrahe <denbrahe@hotmail.com>
+# Contributor: Philipp A. <flying-sheep@web.de>
+pkgname=rambox-os-git
+pkgver=r989.821e3f5
+pkgrel=1
+pkgdesc="Free and Open Source messaging and emailing app that combines common web applications into one."
+arch=(i686 x86_64)
+url="https://github.com/TheGoddessInari/rambox"
+license=('GPL3')
+depends=(electron)
+makedepends=('git' 'desktop-file-utils' 'ruby' 'npm' 'sencha-cmd-6')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}" "rambox" "rambox-bin")
+replaces=()
+backup=()
+options=()
+install=
+source=('rambox-os::git+https://github.com/TheGoddessInari/rambox.git')
+noextract=()
+md5sums=('SKIP')
+
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}"
+ sed -Ei 's/\s+"electron": "[^"]+",//' package.json
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ npm install
+ npm run repack:linux64
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+
+ install -d "$pkgdir/usr/lib"
+ cp -r 'build/production/Rambox' "$pkgdir/usr/lib/rambox-os"
+
+ install -Dm755 "$srcdir/${pkgname%-git}.js" "$pkgdir/usr/bin/${pkgname%-git}"
+ install -Dm644 'resources/Icon.png' "$pkgdir/usr/share/pixmaps/${pkgname%-git}.png"
+ desktop-file-install "$srcdir/${pkgname%-git}.desktop" --dir "$pkgdir/usr/share/applications/"
+}
diff --git a/rambox-os.desktop b/rambox-os.desktop
new file mode 100644
index 000000000000..9d6186575484
--- /dev/null
+++ b/rambox-os.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Rambox-OS
+Comment=Free and Open Source messaging and emailing app that combines common web applications into one.
+Exec=rambox -- %u
+StartupWMClass=Rambox-OS
+Icon=rambox-os
+Terminal=false
+Type=Application
+Categories=Network;
+X-Desktop-File-Install-Version=0.1
+Name[en_US]=Rambox-OS
diff --git a/rambox-os.js b/rambox-os.js
new file mode 100644
index 000000000000..d14ad8e2f4db
--- /dev/null
+++ b/rambox-os.js
@@ -0,0 +1,29 @@
+#!/usr/bin/electron
+
+const name = 'rambox-os'
+
+const {app} = require('electron')
+const fs = require('fs')
+const path = require('path')
+
+// Change command name.
+const fd = fs.openSync('/proc/self/comm', fs.constants.O_WRONLY)
+fs.writeSync(fd, name)
+fs.closeSync(fd)
+
+// Remove first command line argument (/usr/bin/electron).
+process.argv.splice(0, 1)
+
+// Set application paths.
+const appPath = path.join(path.dirname(__dirname), 'lib', name)
+const packageJson = require(path.join(appPath, 'package.json'))
+const productName = packageJson.productName
+app.setAppPath(appPath)
+app.setDesktopName(name + '.desktop')
+app.setName(productName)
+app.setPath('userCache', path.join(app.getPath('cache'), productName))
+app.setPath('userData', path.join(app.getPath('appData'), productName))
+app.setVersion(packageJson.version)
+
+// Run the application.
+require('module')._load(appPath, module, true)