diff --git a/srcpkgs/nvimpager/template b/srcpkgs/nvimpager/template index 5f3050e84a9..7ca7054d857 100644 --- a/srcpkgs/nvimpager/template +++ b/srcpkgs/nvimpager/template @@ -1,7 +1,7 @@ # Template file for 'nvimpager' pkgname=nvimpager -version=0.7 -revision=2 +version=0.9 +revision=1 # In pre_build, date is the date of the last commit in the nvimpager repo. # It should be changed when updating to a new version. create_wrksrc=true @@ -9,42 +9,30 @@ build_wrksrc="${pkgname}-${version}" build_style=gnu-makefile make_build_target="nvimpager.configured" make_build_args="PREFIX=/usr" -hostmakedepends="neovim $(vopt_if man pandoc)" -depends="neovim>=0.3.0 bash" +hostmakedepends="neovim lowdown" +depends="neovim>=0.4.0 bash" short_desc="Wrapper to use neovim as a pager to view manpages, diffs, etc" maintainer="Adrian Herath " license="BSD-2-Clause" homepage="https://github.com/lucc/nvimpager" -distfiles="${homepage}/archive/v${version}.tar.gz - https://www.vim.org/scripts/download_script.php?src_id=14498>AnsiEsc.vba.gz" -checksum="cb4eee0ef2569412b0528eacd7efd6af960bebc11d8749258d8ba83c975ebf4b - a80d8c95a2e497e190831f1b580205653c595c6f51b48d4cb89fb33eaea5ed03" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum="ae2d99d59bd43d96e12a07ffa32c3f120636163308c2b6c1da43052bc8bce1a0" -build_options="man" -desc_option_man="Use pandoc for manpages" +post_patch() { + # replace pandoc with lowdown + vsed -e \ + "s/pandoc .*/lowdown -Tman -m 'date: 2020-12-13' -m 'source: Version v${version}' -s -o nvimpager.1 $ metadata.yml - - mv ../AnsiEsc.vba ./ - - if [ -z "$build_option_man" ]; then - vsed -i 's,pandoc --.*,touch $@,' makefile - fi + # avoid running the rule to generate this file + touch metadata.yaml } post_install() { vlicense LICENSE - if [ -z "$build_option_man" ]; then - rm -rf ${DESTDIR}/usr/share/man - fi }