mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-04 15:32:25 +01:00
76 lines
2.0 KiB
Plaintext
76 lines
2.0 KiB
Plaintext
# Contributor: Chloe Kudryavtsev <toast@toastin.space>
|
|
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
|
|
pkgname=sd
|
|
pkgver=0.6.5
|
|
pkgrel=0
|
|
pkgdesc="An intuitive find & replace CLI"
|
|
url="https://github.com/chmln/sd"
|
|
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # 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="7b4b91e274c4fec5405fc551046fd0db1879f6b6c77ced56d81c83a853e9c10942f80faf2a7aca549b86ed4b57117e8796ef7900d613a809bf34840f218759ac sd-0.6.5.tar.gz"
|