diff options
author | Chloe Kudryavtsev <toast@toastin.space> | 2019-06-09 13:40:40 -0400 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-06-19 08:12:56 -0300 |
commit | 3de4fbcd6980bc5306a9eb94ab94b379fa416066 (patch) | |
tree | be2b25c70876cacb4803ea0ead6db0a25fb30c18 /testing/sd | |
parent | 97ed6987b416ecbf8c5025072d635f667df58157 (diff) | |
download | aports-3de4fbcd6980bc5306a9eb94ab94b379fa416066.tar.bz2 aports-3de4fbcd6980bc5306a9eb94ab94b379fa416066.tar.xz |
testing/sd: new aport
Fast and intuitive sed-like.
Useful in most cases, when sed/awk are overkill.
Diffstat (limited to 'testing/sd')
-rw-r--r-- | testing/sd/APKBUILD | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/testing/sd/APKBUILD b/testing/sd/APKBUILD new file mode 100644 index 0000000000..5b29503125 --- /dev/null +++ b/testing/sd/APKBUILD @@ -0,0 +1,75 @@ +# Contributor: Chloe Kudryavtsev <toast@toastin.space> +# Maintainer: Chloe Kudryavtsev <toast@toastin.space> +pkgname=sd +pkgver=0.6.4 +pkgrel=0 +pkgdesc="An intuitive find & replace CLI" +url="https://github.com/chmln/sd" +arch="x86_64" # limited by rust/cargo +license="MIT" +options="net" +makedepends="cargo" +source="$pkgname-$pkgver.tar.gz::https://github.com/chmln/sd/archive/$pkgver.tar.gz" +subpackages="$pkgname-doc + $pkgname-bash-completion:bashcomp:noarch + $pkgname-zsh-completion:zshcomp:noarch + $pkgname-fish-completion:fishcomp:noarch" + +export CARGO_HOME="$srcdir"/cargo + +build() { + cargo build \ + --release \ + --verbose +} + +check() { + cargo test --all \ + --release \ + --verbose +} + +package() { + install -Dm755 target/release/"$pkgname" "$pkgdir"/usr/bin/"$pkgname" + + # doc + find target/release -name "$pkgname.1" \ + -exec install -Dm644 {} "$pkgdir"/usr/share/man/man1/"$pkgname.1" \; + + # comp + find target/release -name "$pkgname.bash" \ + -exec install -Dm644 {} "$pkgdir"/usr/share/bash-completion/completions/"$pkgname" \; + find target/release -name "$pkgname.fish" \ + -exec install -Dm644 {} "$pkgdir"/usr/share/fish/completions/"$pkgname.fish" \; + find target/release -name "_$pkgname" \ + -exec install -Dm644 {} "$pkgdir"/usr/share/zsh/site-functions/"_$pkgname" \; +} + +bashcomp() { + depends="" + pkgdesk="Bash completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share/ +} + +fishcomp() { + depends="" + pkgdesc="Fish completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel fish" + + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/fish "$subpkgdir"/usr/share/ +} + +zshcomp() { + depends="" + pkgdesc="Zsh completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share +} + +sha512sums="cf0a2890013cc00c21fc29513931df14cf2523337a490d3cd4534c2d350f7331f332e4fb60559346f47820f5a6df25d31556628d49e8d52cd30fdd43a1d735a6 sd-0.6.4.tar.gz" |