aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/skim/APKBUILD86
1 files changed, 86 insertions, 0 deletions
diff --git a/testing/skim/APKBUILD b/testing/skim/APKBUILD
new file mode 100644
index 00000000000..012b3de0153
--- /dev/null
+++ b/testing/skim/APKBUILD
@@ -0,0 +1,86 @@
+# Contributor: Chloe Kudryavtsev <toast@toastin.space>
+# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
+pkgname=skim
+pkgver=0.6.2
+pkgrel=0
+pkgdesc="Fuzzy finder in rust"
+url="https://github.com/lotabout/skim"
+arch="x86_64" # limited by rust/cargo
+license="MIT"
+makedepends="cargo"
+subpackages="
+ $pkgname-doc
+ $pkgname-tmux::noarch
+ $pkgname-vim-plugin:vim:noarch
+ $pkgname-bash-completion:bash:noarch
+ $pkgname-zsh-completion:zsh:noarch
+ $pkgname-bash-keybinds:bashkey:noarch
+ $pkgname-fish-keybinds:fishkey:noarch
+ $pkgname-zsh-keybinds:zshkey:noarch
+ "
+source="$pkgname-$pkgver.tar.gz::https://github.com/lotabout/skim/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+export CARGO_HOME="$srcdir"/cargo
+export RUSTFLAGS="-C target-feature=-crt-static"
+
+build() {
+ cd "$builddir"
+ cargo build \
+ --release \
+ --verbose
+}
+
+check() {
+ cd "$builddir"
+ cargo test --all \
+ --release \
+ --verbose
+}
+
+package() {
+ cd "$builddir"
+ install -Dm755 target/release/sk bin/sk-tmux -t "$pkgdir"/usr/bin
+ install -Dm644 shell/skim.1 -t "$pkgdir"/usr/share/man/man1/
+
+ install -Dm644 plugin/skim.vim -t "$pkgdir"/usr/share/vim/vimfiles/plugin
+
+ install -Dm644 shell/completion.bash "$pkgdir"/usr/share/bash-completions/completions/sk
+ install -Dm644 shell/completion.zsh "$pkgdir"/usr/share/zsh/site-finctions/_sk
+
+ install -Dm644 shell/key-bindings.* -t "$pkgdir"/usr/share/"$pkgname"
+}
+
+vim() {
+ install -d "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/vim "$subpkgdir"/usr/share
+}
+
+tmux() {
+ install -d "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/sk-tmux "$subpkgdir"/usr/bin
+}
+
+bash() {
+ install -d "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/bash-completions "$subpkgdir"/usr/share
+}
+zsh() {
+ install -d "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share
+}
+
+bashkey() {
+ install -d "$subpkgdir"/usr/share/"$pkgname"
+ mv "$pkgdir"/usr/share/"$pkgname"/key-bindings.bash "$subpkgdir"/usr/share/"$pkgname"
+}
+fishkey() {
+ install -d "$subpkgdir"/usr/share/"$pkgname"
+ mv "$pkgdir"/usr/share/"$pkgname"/key-bindings.fish "$subpkgdir"/usr/share/"$pkgname"
+}
+zshkey() {
+ install -d "$subpkgdir"/usr/share/"$pkgname"
+ mv "$pkgdir"/usr/share/"$pkgname"/key-bindings.zsh "$subpkgdir"/usr/share/"$pkgname"
+}
+
+sha512sums="47c89b9f6bdbbc3c470c4edb5b23fcf94165cb34ab7be4de6113b4eb4433d81064395c5495d2129c7877dd8ed3bea9067f1d2b965fd7683c39aec1bb070b7b3d skim-0.6.2.tar.gz"