aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mdcat/APKBUILD
blob: d64f2558e99b37bf3925448046b95b5260cbc1ee (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.21.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="86ad1aa6afcf7486f3ba582281a9a52f2ec17c0fdf174e56a236c85ddb6cbebc088e7de5f5e8ef89b51f912d8d671ebcb09029a163e2dda850a84caac2617718  mdcat-0.21.1.tar.gz"