diff options
author | Ben Westover | 2020-11-04 00:00:30 -0500 |
---|---|---|
committer | Ben Westover | 2020-11-04 00:00:30 -0500 |
commit | 5d14c26d0f057fe086ae321439e074907f2df052 (patch) | |
tree | 99cd84680146811bbbe8c01ad86e32e67ffccaf7 | |
parent | 7208c64c5a3f6b2bd413f503dc47387496c4cb77 (diff) | |
download | aur-5d14c26d0f057fe086ae321439e074907f2df052.tar.gz |
Make GUI Optional
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 26 |
2 files changed, 21 insertions, 6 deletions
@@ -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 @@ -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 } |