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

View file

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