mdcat: update to 2.3.0

This commit is contained in:
cinerea0 2024-07-30 11:25:38 -04:00 committed by cinerea0
parent b91f96f624
commit b8d3fa0e3d
1 changed files with 15 additions and 11 deletions

View File

@ -1,8 +1,9 @@
# Template file for 'mdcat'
pkgname=mdcat
version=2.2.0
version=2.3.0
revision=1
build_style=cargo
build_helper=qemu
hostmakedepends="pkg-config ruby-asciidoctor"
makedepends="openssl-devel"
depends="shared-mime-info"
@ -13,7 +14,7 @@ license="MPL-2.0"
homepage="https://github.com/swsnr/mdcat"
changelog="https://raw.githubusercontent.com/swsnr/mdcat/main/CHANGELOG.md"
distfiles="https://github.com/swsnr/mdcat/archive/refs/tags/mdcat-${version}.tar.gz"
checksum=bc57c65786dbb4986d75762252b76a73ab52dc60f3b088089753a0d51617cdb0
checksum=0582923595d974d671d4f4dc337ed5be2e554df93974159a6277dbc0345590bc
make_check=ci-skip # uses network tests which fail in CI
case "$XBPS_TARGET_MACHINE" in
@ -22,16 +23,19 @@ case "$XBPS_TARGET_MACHINE" in
esac
post_install() {
ln -sf /usr/bin/mdcat "${DESTDIR}/usr/bin/mdless"
# additional symlink to make completion generation work
ln -sf "${DESTDIR}/usr/bin/mdcat" /usr/bin/mdcat
for command in mdcat mdless; do
bash_completion=$(find ${wrksrc}/target -name ${command}.bash -print -quit)
vcompletion ${bash_completion} bash ${command}
zsh_completion=$(find ${wrksrc}/target -name _${command} -print -quit)
vcompletion ${zsh_completion} zsh ${command}
fish_completion=$(find ${wrksrc}/target -name ${command}.fish -print -quit)
vcompletion ${fish_completion} fish ${command}
for shell in bash fish zsh; do
vtargetrun "${DESTDIR}/usr/bin/${command}" --completions "${shell}" \
> "${command}.${shell}"
vcompletion "${command}.${shell}" "${shell}" "${command}"
done
done
man_page=$(find ${wrksrc}/target -name mdcat.1 -print -quit)
vman ${man_page}
ln -sf /usr/bin/mdcat ${DESTDIR}/usr/bin/mdless
asciidoctor -b manpage -a reproducible -o mdcat.1 mdcat.1.adoc
vman mdcat.1
ln -sf /usr/share/man/man1/mdcat.1 "${DESTDIR}/usr/share/man/man1/mdless.1"
}