summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGitHub Action2023-09-04 05:09:42 +0000
committerGitHub Action2023-09-04 05:09:42 +0000
commit6ddeee8cae3e08a1432a4e22753641dbdea9a620 (patch)
treea227a3135bad6f2fe55e502655467dbd1a8eaf16
parentc56c6e3886c6937973dcca569f2d85096566dea3 (diff)
downloadaur-6ddeee8cae3e08a1432a4e22753641dbdea9a620.tar.gz
Update from GitHub Actions: feat(hyprshade-git): same completion as `hyprshade`
https://github.com/loqusion/aur-packages/actions/runs/6069342551
-rw-r--r--PKGBUILD31
1 files changed, 22 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 44495da3d6ce..63d9890f596b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -36,15 +36,28 @@ pkgver() {
}
}
+_get_wheel() {
+ local wheel=
+ local file
+ for file in ./dist/${_pkgname}-*.whl; do
+ if [ -n "$wheel" ]; then
+ echo "Multiple wheels found: $wheel and $file" >&2
+ exit 1
+ fi
+ wheel=$file
+ done
+ echo "$wheel"
+}
+
build() {
cd $_pkgname
- pdm install --no-editable
- pdm build
+ pdm build --no-isolation --no-sdist
mkdir -p assets/completions
- export PYTHONPATH="./src"
- _HYPRSHADE_COMPLETE=bash_source pdm run hyprshade >assets/completions/hyprshade.bash
- _HYPRSHADE_COMPLETE=fish_source pdm run hyprshade >assets/completions/hyprshade.fish
- _HYPRSHADE_COMPLETE=zsh_source pdm run hyprshade >assets/completions/_hyprshade
+ _wheel=$(_get_wheel)
+ export PYTHONPATH="$_wheel"
+ _HYPRSHADE_COMPLETE=bash_source /usr/bin/python "$_wheel/$_pkgname" >assets/completions/$_pkgname.bash
+ _HYPRSHADE_COMPLETE=fish_source /usr/bin/python "$_wheel/$_pkgname" >assets/completions/$_pkgname.fish
+ _HYPRSHADE_COMPLETE=zsh_source /usr/bin/python "$_wheel/$_pkgname" >assets/completions/_$_pkgname
}
package() {
@@ -54,7 +67,7 @@ package() {
install -Dm0644 -t "$pkgdir/usr/share/licenses/$_pkgname/" LICENSE
install -Dm0644 -t "$pkgdir/usr/share/$_pkgname/shaders/" shaders/*
install -Dm0644 -t "$pkgdir/usr/share/$_pkgname/examples/" examples/*
- install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" assets/completions/hyprshade.bash
- install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" assets/completions/hyprshade.fish
- install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" assets/completions/_hyprshade
+ install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" assets/completions/$_pkgname.bash
+ install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" assets/completions/$_pkgname.fish
+ install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" assets/completions/_$_pkgname
}