diff options
author | Håvard Pettersson | 2018-04-15 16:38:34 +0200 |
---|---|---|
committer | Håvard Pettersson | 2018-04-15 16:38:34 +0200 |
commit | 66fac667aa5045aebec8427420c1151d5bc6be7f (patch) | |
tree | ce19427892f25c0f121154ebbae318062c1305d3 | |
parent | 4a2750b10ea57cdc831b9601177e8af9c32cd6d7 (diff) | |
download | aur-66fac667aa5045aebec8427420c1151d5bc6be7f.tar.gz |
Ship with system Electron
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 61 | ||||
-rw-r--r-- | etcher | 8 | ||||
-rwxr-xr-x | etcher-electron | 2 |
4 files changed, 58 insertions, 30 deletions
@@ -1,12 +1,14 @@ -# Generated by mksrcinfo v8 -# Wed Jan 24 09:43:52 UTC 2018 pkgbase = etcher pkgdesc = Burn images to SD cards & USB drives, safe & easy pkgver = 1.3.1 - pkgrel = 1 - url = http://www.etcher.io/ + pkgrel = 2 + url = https://www.etcher.io/ arch = x86_64 license = apache + makedepends = npm + makedepends = python2 + makedepends = git + depends = electron depends = gtk2 depends = libxtst depends = libxss @@ -15,9 +17,10 @@ pkgbase = etcher depends = alsa-lib optdepends = libnotify: for notifications optdepends = speech-dispatcher: for text-to-speech - options = !strip - source_x86_64 = https://github.com/resin-io/etcher/releases/download/v1.3.1/etcher-electron_1.3.1_amd64.deb - sha256sums_x86_64 = 366a083b6009ae75830fd920a947812ab9c7ec3a2039dc1b8524d28640b8179d + source = https://github.com/resin-io/etcher/archive/v1.3.1.tar.gz + source = etcher-electron + sha256sums = a6d08e8e4cf37c233e47317967e29e637e3d1ed72861ae5b239828ffbf312921 + sha256sums = 70b2eb283cbf03a03232ceefeaa0be2dffd6253ab6a9cd1834dee674ee1e3ab7 pkgname = etcher @@ -1,21 +1,52 @@ -# Maintainer: Andrew Stubbs <andrew.stubbs@gmail.com> +# Maintainer: Håvard Pettersson <mail@haavard.me> +# Contributor: Andrew Stubbs <andrew.stubbs@gmail.com> + pkgname=etcher -_realver=1.3.1 -pkgver=${_realver//-/_} -pkgrel=1 -pkgdesc="Burn images to SD cards & USB drives, safe & easy" -arch=('x86_64') -url="http://www.etcher.io/" -license=('apache') -depends=('gtk2' 'libxtst' 'libxss' 'gconf' 'nss' 'alsa-lib') +pkgver=1.3.1 +pkgrel=2 +pkgdesc='Burn images to SD cards & USB drives, safe & easy' +arch=(x86_64) +url='https://www.etcher.io/' +license=(apache) +depends=(electron gtk2 libxtst libxss gconf nss alsa-lib) +makedepends=(npm python2 git) optdepends=('libnotify: for notifications' - 'speech-dispatcher: for text-to-speech') -source_x86_64=("https://github.com/resin-io/etcher/releases/download/v${_realver}/etcher-electron_${_realver}_amd64.deb") -options=("!strip") -sha256sums_x86_64=('366a083b6009ae75830fd920a947812ab9c7ec3a2039dc1b8524d28640b8179d') + 'speech-dispatcher: for text-to-speech') +source=("https://github.com/resin-io/$pkgname/archive/v$pkgver.tar.gz" + 'etcher-electron') +sha256sums=('a6d08e8e4cf37c233e47317967e29e637e3d1ed72861ae5b239828ffbf312921' + '70b2eb283cbf03a03232ceefeaa0be2dffd6253ab6a9cd1834dee674ee1e3ab7') + +prepare() { + cd "$pkgname-$pkgver" + sed -i 's/python$/python2/' scripts/build/dependencies-npm.sh +} +build() { + cd "$pkgname-$pkgver" + + export PATH="$(pwd)/node_modules/.bin:$PATH" + ./scripts/build/dependencies-npm.sh \ + -s linux \ + -r x64 \ + -t electron \ + -v "$(pacman -Q electron | sed 's/electron \(.\+\)-.\+/\1/')" \ + -p +} package() { - cd "$pkgdir" - tar xf "$srcdir/data.tar.xz" + cd "$pkgname-$pkgver" + + _appdir="$pkgdir"/usr/share/$pkgname + install -d "$_appdir" + + install package.json "$_appdir" + cp -a lib "$_appdir" + cp -a build "$_appdir" + cp -a assets/icon.png "$_appdir" + cp -a node_modules/ "$_appdir" + + install -Dm755 "$srcdir"/etcher-electron "$pkgdir"/usr/bin/etcher-electron } + +# vim:set ts=2 sw=2 et: diff --git a/etcher b/etcher deleted file mode 100644 index 4247e2dc50f9..000000000000 --- a/etcher +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# Prevent the AppImage prompting the user to create a Desktop file -# in ~/.local when we already have one in /usr/share. -DESKTOPINTEGRATION=no -export DESKTOPINTEGRATION - -exec /usr/share/etcher/Etcher-$realver-linux-$a.appimage diff --git a/etcher-electron b/etcher-electron new file mode 100755 index 000000000000..8aa19ae22464 --- /dev/null +++ b/etcher-electron @@ -0,0 +1,2 @@ +#!/usr/bin/sh +exec electron /usr/share/etcher/lib/start.js |