mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-25 09:41:35 +01:00
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
# Contributor: Chloe Kudryavtsev <toast@toast.cafe>
|
|
# Maintainer: Chloe Kudryavtsev <toast@toast.cafe>
|
|
pkgname=sd
|
|
pkgver=0.7.6
|
|
pkgrel=1
|
|
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/v$pkgver.tar.gz"
|
|
subpackages="$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-zsh-completion
|
|
$pkgname-fish-completion
|
|
"
|
|
|
|
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" \;
|
|
}
|
|
|
|
sha512sums="79f23259b53f5dfd31b729aba7f43d8ba9ce91d390f29e065d77a3b2a6a426e84fc7d6cccb3c1a10976a177d32532c69fa327a9a0b435a967a8a1d40de000bc6 sd-0.7.6.tar.gz"
|