Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PKGBUILD for Rambox 0.6 (faulty)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'auto-launch-patched'
at Module._resolveFilename (module.js:543:15)
at Function.Module._resolveFilename (/usr/lib/electron/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:473:25)
at Module.require (module.js:586:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/lib/rambox/electron/main.js:7:18)
at Object.<anonymous> (/usr/lib/rambox/electron/main.js:454:3)
at Module._compile (module.js:642:30)
at Object.Module._extensions..js (module.js:653:10)
at Module.load (module.js:561:32)
# Maintainer: Philipp A. <flying-sheep@web.de>
pkgname=rambox
pkgver=0.6.2
pkgrel=1
pkgdesc='Free and Open Source messaging and emailing app that combines common web applications into one.'
arch=(i686 x86_64)
depends=(electron)
makedepends=(desktop-file-utils asar ruby npm sencha-cmd-6)
url='http://rambox.pro/'
license=(GPL3)
source=("https://github.com/saenzramiro/$pkgname/archive/$pkgver.tar.gz"
"https://github.com/saenzramiro/$pkgname/releases/download/$pkgver/Rambox-$pkgver-linux-x64.tar.gz"
"$pkgname.desktop" "$pkgname.js")
sha256sums=('1f4f4c35ae8e649829b0c5c5017a458222ab78875a34a7f1fad2d19340b37106'
'6b90751ac36b1a2803360fcdf3c10f4d8eb083bc7328cfe360bb914c489f3fcd'
'61ad70a929c402e24c79b8868208310f9b3c4d7801db2b791af38293231ee524'
'3b5ed6f04eea66f239b5ae56ea1ff9e47de156cd38bb54ebc46541daba6091b6')
noextract=("Rambox-$pkgver-x64.tar.gz")
build() {
# retrieve env.js
cd "$srcdir"
tar xOf "Rambox-$pkgver-linux-x64.tar.gz" "Rambox-$pkgver-linux-x64/resources/app.asar" >app.asar
cd "community-edition-0.6.2"
asar ef ../app.asar env.js
# install packages
sed -Ei 's/\s+"electron": "[^"]+",//' package.json
npm install
# build
npm run sencha:compile
sed -i "s/require('electron-is-dev')/false/" '../rambox-build/electron/main.js'
}
package() {
cd "$srcdir"
install -d "$pkgdir/usr/lib"
cp -r 'rambox-build' "$pkgdir/usr/lib/rambox"
install -Dm755 "$srcdir/$pkgname.js" "$pkgdir/usr/bin/$pkgname"
install -Dm644 'rambox-build/resources/Icon.png' "$pkgdir/usr/share/pixmaps/$pkgname.png"
desktop-file-install "$srcdir/$pkgname.desktop" --dir "$pkgdir/usr/share/applications/"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment