summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Westover2022-11-20 18:18:08 -0500
committerBen Westover2022-11-20 18:18:08 -0500
commitad87e8e6b808d2429a916229e6eb82c31b9485f3 (patch)
treee48ab37d1eaa02655bf33724282eaaad090b512c
parent36fb937741cd1ddf15364509f509e50e35f462c2 (diff)
downloadaur-ad87e8e6b808d2429a916229e6eb82c31b9485f3.tar.gz
Add GUI
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD51
-rwxr-xr-xchia-gui.sh4
-rw-r--r--chia.desktop10
-rwxr-xr-xchia.sh4
5 files changed, 73 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d32b0dc1c9a5..f38fcad38921 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,34 @@
pkgbase = chia-git
- pkgdesc = A new blockchain and smart transaction platform that is easier to use, more efficient, and secure.
- pkgver = 1.3.4.r93.g6fe711673
+ pkgdesc = A new blockchain and smart transaction platform that is easier to use, more efficient, and secure. - Latest git commit, provides GUI
+ pkgver = 1.7.0.b2.r15.g5f706cea27
pkgrel = 1
url = https://www.chia.net/
install = chia-git.install
arch = x86_64
arch = aarch64
license = Apache
+ makedepends = npm
+ makedepends = git
depends = python
- depends = git
+ depends = nodejs
+ depends = electron
+ depends = openssl
provides = chia
provides = chia-cli
conflicts = chia
conflicts = chia-cli
options = !strip
source = git+https://github.com/Chia-Network/chia-blockchain.git
+ source = git+https://github.com/Chia-Network/chia-blockchain-gui.git
source = git+https://github.com/Chia-Network/mozilla-ca.git
+ source = chia.sh
+ source = chia-gui.sh
+ source = chia.desktop
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = ff9b9ee5d8a8b0d8b2d2129431663b3d4a199fe47d8996cfcdf06183c48b6349
+ sha256sums = dc42fea5581ee9ecc2b6e386b379ba3eaecabee0c92bab4b05bc5016cff3d1a4
+ sha256sums = f5374d9ed5f67567256c2df919559882a72db47709a42df820a44bad1bedd285
pkgname = chia-git
diff --git a/PKGBUILD b/PKGBUILD
index aafc42da10a1..1298cb8cdfd8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,30 @@
-# Maintainer: Ben Westover <kwestover.kw@gmail.com>
+# Maintainer: Ben Westover <me@benthetechguy.net>
pkgname='chia-git'
-pkgver=1.3.4.r93.g6fe711673
+pkgver=1.7.0.b2.r15.g5f706cea27
pkgrel=1
-pkgdesc="A new blockchain and smart transaction platform that is easier to use, more efficient, and secure."
+pkgdesc="A new blockchain and smart transaction platform that is easier to use, more efficient, and secure. - Latest git commit, provides GUI"
arch=('x86_64' 'aarch64')
url="https://www.chia.net/"
license=('Apache')
install=chia-git.install
-depends=('python' 'git')
+depends=('python' 'nodejs' 'electron' 'openssl')
+makedepends=('npm' 'git')
conflicts=('chia' 'chia-cli')
provides=('chia' 'chia-cli')
options=('!strip')
source=("git+https://github.com/Chia-Network/chia-blockchain.git"
- "git+https://github.com/Chia-Network/mozilla-ca.git")
+ "git+https://github.com/Chia-Network/chia-blockchain-gui.git"
+ "git+https://github.com/Chia-Network/mozilla-ca.git"
+ "chia.sh"
+ "chia-gui.sh"
+ "chia.desktop")
sha256sums=('SKIP'
- 'SKIP')
+ 'SKIP'
+ 'SKIP'
+ 'ff9b9ee5d8a8b0d8b2d2129431663b3d4a199fe47d8996cfcdf06183c48b6349'
+ 'dc42fea5581ee9ecc2b6e386b379ba3eaecabee0c92bab4b05bc5016cff3d1a4'
+ 'f5374d9ed5f67567256c2df919559882a72db47709a42df820a44bad1bedd285')
pkgver() {
cd chia-blockchain
@@ -23,25 +32,45 @@ pkgver() {
}
prepare() {
- mv mozilla-ca chia-blockchain
cd chia-blockchain
- git submodule update --init mozilla-ca
+ git submodule init
+ git config submodule.mozilla-ca.url "$srcdir/mozilla-ca"
+ git config submodule.chia-blockchain-gui.url "$srcdir/chia-blockchain-gui"
+ git -c protocol.file.allow=always submodule update
}
build() {
cd chia-blockchain
python -m venv venv
- ln -s venv/bin/activate .
+ ln -s venv/bin/activate
source activate
pip install --upgrade pip
pip install wheel
pip install --extra-index-url https://pypi.chia.net/simple/ miniupnpc==2.2.2
pip install -e . --extra-index-url https://pypi.chia.net/simple/
+
+ cd chia-blockchain-gui
+ npm install
+ npm run build
}
package() {
mkdir -p "$pkgdir/opt"
+ mv chia-blockchain/chia-blockchain-gui/packages/gui chia-blockchain
+ rm -rf chia-blockchain/chia-blockchain-gui
+ rm -rf chia-blockchain/gui/node_modules
mv chia-blockchain "$pkgdir/opt"
- find "$pkgdir/opt/chia-blockchain" -type f -exec sed -i "s|${srcdir}|/opt|g" {} \; # replace references to srcdir with final install location
- find "$pkgdir/opt/chia-blockchain" -name '*.pyc' -delete # remove compiled python modules because they contain references to srcdir
+
+ install -Dm755 chia.sh "$pkgdir/usr/bin/chia"
+ install -Dm755 chia-gui.sh "$pkgdir/usr/bin/chia-gui"
+ install -Dm644 chia.desktop "$pkgdir/usr/share/applications/chia.desktop"
+ mkdir -p "$pkgdir/usr/share/icons/hicolor/scalable/apps"
+ ln -s /opt/chia-blockchain/gui/src/assets/img/chia_circle.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/chia.svg"
+
+ # remove "../../../" based on buildtime directory layout
+ find "$pkgdir/opt/chia-blockchain/gui" -type f -exec sed -i "s|\.\./\.\./\.\./||g" {} \;
+ # replace references to srcdir with final install location
+ find "$pkgdir/opt/chia-blockchain" -type f -exec sed -i "s|${srcdir}|/opt|g" {} \;
+ # remove compiled python modules because they contain references to srcdir
+ find "$pkgdir/opt/chia-blockchain" -name '*.pyc' -delete
}
diff --git a/chia-gui.sh b/chia-gui.sh
new file mode 100755
index 000000000000..be8e44d284df
--- /dev/null
+++ b/chia-gui.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+cd /opt/chia-blockchain
+source venv/bin/activate
+electron "$@" gui
diff --git a/chia.desktop b/chia.desktop
new file mode 100644
index 000000000000..0546157e265f
--- /dev/null
+++ b/chia.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Chia
+Comment=GUI for the Chia Blockchain
+Exec=chia-gui %u
+Icon=chia
+Terminal=false
+Categories=Network;Office;Finance;P2P;
+Keywords=chia;blockchain;plot;farm;wallet;
diff --git a/chia.sh b/chia.sh
new file mode 100755
index 000000000000..020e195e85b6
--- /dev/null
+++ b/chia.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+cd /opt/chia-blockchain
+source venv/bin/activate
+chia "$@"