summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcsculley2020-03-21 19:00:26 -0400
committercsculley2020-03-21 19:01:51 -0400
commit10aef5dd7f38de551870ed8b849f1cd550b52bd2 (patch)
tree1f0eebe4980f01b12bd1fd203f80cc8faf5b7806
downloadaur-10aef5dd7f38de551870ed8b849f1cd550b52bd2.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD49
-rw-r--r--idena-desktop.desktop8
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..824ba16595a8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = idena-desktop-git
+ pkgdesc = The idena-desktop application for the Idena network
+ pkgver = v0.0.10.r233.g647bc41
+ pkgrel = 1
+ url = https://github.com/idena-network/idena-desktop
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = npm
+ depends = electron
+ depends = libappindicator-gtk3
+ depends = libnotify
+ provides = idena-desktop
+ conflicts = idena-desktop
+ source = idena-desktop-git::git+https://github.com/idena-network/idena-desktop.git
+ source = idena-desktop.desktop
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = idena-desktop-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e0a416a861a9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Chris Sculley <cs.sculley at gmail dot com>
+pkgname=idena-desktop-git
+pkgver=v0.0.10.r233.g647bc41
+pkgrel=1
+pkgdesc="The idena-desktop application for the Idena network"
+arch=("x86_64")
+url="https://github.com/idena-network/idena-desktop"
+license=("GPL3")
+makedepends=("git" "npm")
+depends=("electron" "libappindicator-gtk3" "libnotify")
+provides=("idena-desktop")
+conflicts=("idena-desktop")
+source=("$pkgname::git+https://github.com/idena-network/idena-desktop.git"
+ "idena-desktop.desktop")
+md5sums=("SKIP" "SKIP")
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ # use system electron version
+ # see: https://wiki.archlinux.org/index.php/Electron_package_guidelines
+ electronDist=$(dirname $(realpath $(which electron)))
+ electronVer=$(electron --version | tail -c +2)
+ # sed -i '/ "electron": /d' ./package.json
+ HOME="$srcdir/$pkgname/.electron-gyp" npm install --cache "$srcdir/$pkgname/npm-cache"
+ npm run build && ./node_modules/.bin/electron-builder --linux --x64 --dir dist -c.electronDist=$electronDist -c.electronVersion=$electronVer
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ install -Dm644 main/static/icon-512.png "$pkgdir/usr/share/pixmaps/idena-desktop.png"
+
+ mkdir -m755 "$pkgdir"/{opt,usr/bin}
+ cp -a "dist/linux-unpacked" "$pkgdir/opt/idena-desktop"
+ ln -s /opt/idena-desktop/idena-desktop "$pkgdir/usr/bin/idena-desktop"
+
+ install -Dm644 "$srcdir/idena-desktop.desktop" -t "$pkgdir/usr/share/applications"
+ # install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
+}
+
diff --git a/idena-desktop.desktop b/idena-desktop.desktop
new file mode 100644
index 000000000000..ba747a719df4
--- /dev/null
+++ b/idena-desktop.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Idena Desktop
+Comment=Desktop application for the Idena Network
+Exec=idena-desktop %U
+Terminal=false
+Type=Application
+Icon=idena-desktop
+Categories=Financial;