summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Westover2020-11-04 00:00:30 -0500
committerBen Westover2020-11-04 00:00:30 -0500
commit5d14c26d0f057fe086ae321439e074907f2df052 (patch)
tree99cd84680146811bbbe8c01ad86e32e67ffccaf7
parent7208c64c5a3f6b2bd413f503dc47387496c4cb77 (diff)
downloadaur-5d14c26d0f057fe086ae321439e074907f2df052.tar.gz
Make GUI Optional
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD26
2 files changed, 21 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cb6cc6d0512a..51d9aa9d50f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,6 +16,7 @@ pkgbase = chia-git
depends = python
depends = npm
depends = nodejs
+ options = !strip
source = git+https://github.com/Chia-Network/chia-blockchain.git
source = chia-gui.desktop
source = chia-gui.sh
diff --git a/PKGBUILD b/PKGBUILD
index e552b7b46dda..b9c4a5bd961b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,6 +22,15 @@ pkgver() {
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ read -r -p "Install Electron GUI? [y/N]" input
+ case $input in
+ [yY][eE][sS]|[yY])
+ echo "1" > "$srcdir"/gui.choice
+ ;;
+ esac
+}
+
build() {
cd chia-blockchain
python3 -m venv venv
@@ -31,15 +40,20 @@ build() {
pip install wheel
pip install --extra-index-url https://download.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10 cbor2==5.1.2
pip install -e .
- cd electron-react
- npm install
- npm audit fix
- npm run build
+ if [[ "$(< "$srcdir"/gui.choice)" == "1" ]]; then
+ cd electron-react
+ npm install
+ npm audit fix
+ npm run build
+ fi
}
package() {
- install -Dm644 chia-blockchain/electron-react/src/assets/img/circle-cropped.png "$pkgdir"/usr/share/pixmaps/chia.png
+ if [[ "$(< "$srcdir"/gui.choice)" == "1" ]]; then
+ install -Dm644 chia-blockchain/electron-react/src/assets/img/circle-cropped.png "$pkgdir"/usr/share/pixmaps/chia.png
+ install -Dm755 chia-gui.sh "$pkgdir"/usr/bin/chia-gui
+ install -Dm644 chia-gui.desktop "$pkgdir"/usr/share/applications/chia-gui.desktop
+ fi
mkdir -p "$pkgdir"/opt
mv chia-blockchain "$pkgdir"/opt
- install -Dm755 chia-gui.sh "$pkgdir"/usr/bin/chia-gui
}