aboutsummaryrefslogtreecommitdiffstats
path: root/community/fd/APKBUILD
blob: 7ff79a3e920634f3b135851b7e2bf6d32ad38fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=fd
pkgver=8.1.1
pkgrel=2
pkgdesc="Simple, fast, user-friendly alternative to find"
url="https://github.com/sharkdp/fd"
arch="all !s390x !mips64" # limited by cargo
license="MIT Apache-2.0"
makedepends="cargo"
checkdepends="coreutils"
options="net"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/sharkdp/fd/archive/v$pkgver.tar.gz
	minimize-size.patch
	"

build() {
	cargo build --release --locked
}

check() {
	cargo test --release --locked
}

package() {
	cargo install --locked --path . --root="$pkgdir"/usr
	rm "$pkgdir"/usr/.crates.toml "$pkgdir"/usr/.crates2.json
	install -Dm644 doc/fd.1 "$pkgdir"/usr/share/man/man1/fd.1

	find "$builddir"/target/release/build/fd-find-* -type f -iname fd.bash \
		-exec install -Dm644 '{}' "$pkgdir"/usr/share/bash-completion/completions/fd \;
	find "$builddir"/target/release/build/fd-find-* -type f -iname _fd \
		-exec install -Dm644 '{}' "$pkgdir"/usr/share/zsh/site-functions/_fd \;
	find "$builddir"/target/release/build/fd-find-* -type f -iname fd.fish \
		-exec install -Dm644 '{}' "$pkgdir"/usr/share/fish/completions/fd.fish \;
}

sha512sums="71c078deacd498ebd9e52e32c4208c35383035ec7b87513b4127319c0294b598ce8fd9ad1acb7d665f6b64024b69f6f9fe3ace93da9f1504b7d5875018204352  fd-8.1.1.tar.gz
94e9baed1a3de46d4ca71b062f5dd334bb03d7e0c302eabff5d038dad22d08cf7d736a2eebf56fc2b8bc2d68c8fb825b4f3c196100bd31bfa56561bc66923995  minimize-size.patch"