Created
March 22, 2019 16:19
-
-
Save PedroHLC/5fdf5c6fa6016baf1494d2c3e4f6ae6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contributor: Philipp A. <[email protected]> | |
pkgname=rambox-ce | |
pkgver=0.6.4 | |
pkgrel=0 | |
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/ramboxapp/community-edition/archive/$pkgver.tar.gz" | |
"https://github.com/ramboxapp/community-edition/releases/download/$pkgver/Rambox-$pkgver-linux-x64.tar.gz" | |
"$pkgname.desktop" "$pkgname.js") | |
sha256sums=('SKIP' | |
'SKIP' | |
'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-$pkgver" | |
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/" 'build/production/Rambox/electron/main.js' | |
} | |
package() { | |
cd "$srcdir/community-edition-$pkgver" | |
install -d "$pkgdir/usr/lib" | |
cp -r 'build/production/Rambox' "$pkgdir/usr/lib/rambox" | |
install -Dm755 "$srcdir/$pkgname.js" "$pkgdir/usr/bin/$pkgname" | |
install -Dm644 '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