summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Zhang2019-05-17 20:31:22 +0800
committerBruce Zhang2019-05-17 20:31:22 +0800
commit1c791fd1f8dde5096267fcefc346743e579ca119 (patch)
tree7516958bf9f648670b93ff7ffe673d0770ea775a
downloadaur-simplenote-electron.tar.gz
commit
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD33
3 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8042ca7418c6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = simplenote-electron
+ pkgdesc = A Simplenote React app packaged via Electron for Windows and Linux
+ pkgver = 1.5.0
+ pkgrel = 1
+ url = https://github.com/Automattic/simplenote-electron
+ arch = x86_64
+ arch = i686
+ license = GPL
+ depends = electron
+ provides = simplenote-electron
+ conflicts = simplenote-electron-bin
+ source = simplenote-electron-1.5.0.src.tar.gz::https://github.com/Automattic/simplenote-electron/archive/v1.5.0.tar.gz
+ sha256sums = 5103b61db4cb6c4ea2f4359ec00560d16be7d32cf32612a2985c76fbd2488d64
+
+pkgname = simplenote-electron
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..6e98ed75a5c1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src
+pkg
+*.pkg.tar.xz
+*.src.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..03920f4384dc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Bruce Zhang
+pkgname=simplenote-electron
+pkgver=1.5.0
+pkgrel=1
+pkgdesc="A Simplenote React app packaged via Electron for Windows and Linux"
+arch=('x86_64' 'i686')
+url="https://github.com/Automattic/simplenote-electron"
+license=('GPL')
+depends=('electron')
+provides=('simplenote-electron')
+conflicts=('simplenote-electron-bin')
+source=("$pkgname-$pkgver.src.tar.gz::https://github.com/Automattic/simplenote-electron/archive/v$pkgver.tar.gz")
+sha256sums=('5103b61db4cb6c4ea2f4359ec00560d16be7d32cf32612a2985c76fbd2488d64')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ electronVersion=$(cat /usr/lib/electron/version)
+ electronDist="\/usr\/lib\/electron"
+
+ sed -i "s/\"electron\": \".*/\"electron\": \"$electronVersion\",/" "$srcdir/$pkgname-$pkgver/package.json"
+ sed -i "s/electronVersion,/electronDist: \"$electronDist\", electronVersion: \"$electronVersion\",/" "$srcdir/$pkgname-$pkgver/builder.js"
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ HOME="$srcdir/.electron-gyp" npm install
+ make build
+ ./node_modules/.bin/electron-builder -l --dir
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+}