aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mdcat/APKBUILD
blob: c0324d5ee12ecaa12a087f07cd5dd93fed896d48 (plain) (blame)
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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=mdcat
pkgver=0.22.1
pkgrel=0
pkgdesc="Cat for markdown"
url="https://github.com/lunaryorn/mdcat"
arch="all !s390x !mips !mips64" # Limited by cargo
license="Apache-2.0"
makedepends="cargo openssl-dev"
checkdepends="py3-ansi2html"
subpackages="
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/lunaryorn/mdcat/archive/mdcat-$pkgver.tar.gz"
builddir="$srcdir/mdcat-mdcat-$pkgver"

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

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

package() {
	install -s -Dm0755 target/release/mdcat -t "$pkgdir"/usr/bin

	# Install the generated shell completion files
	install -Dm644 "$builddir"/target/release/build/mdcat-*/out/completions/mdcat.bash \
		-t "$pkgdir"/usr/share/bash-completion/completions
	install -Dm644 "$builddir"/target/release/build/mdcat-*/out/completions/_mdcat \
		-t "$pkgdir"/usr/share/zsh/site-functions
	install -Dm644 "$builddir"/target/release/build/mdcat-*/out/completions/mdcat.fish \
		-t "$pkgdir"/usr/share/fish/completions
}

sha512sums="4a3a430ae4f8bdb273e404591703a3a681509bb9a6e88bb3f682cd46ec904ea2cdabab1e273178d58d77229398d0623abc945af34b9b20211bd0291a0f817dfe  mdcat-0.22.1.tar.gz"