void-packages/srcpkgs/nvi/template

43 lines
1.2 KiB
Bash

# Template file for 'nvi'
pkgname=nvi
version=1.81.6
revision=17
build_wrksrc=dist
build_style=gnu-configure
makedepends="ncurses-devel db-devel"
short_desc="Berkeley Vi Editor"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://repo.or.cz/nvi.git"
#distfiles="${homepage}/devel/nvi-$version.tar.bz2"
distfiles="http://pkgs.fedoraproject.org/repo/pkgs/nvi/nvi-${version}.tar.bz2/88d1e23115ee9f2961186b62e55f5704/nvi-${version}.tar.bz2"
checksum=3441b8e3247b2b6dd19b5fd38355fe6593b2a92e960ecb3dd00d676f63d06b59
alternatives="
vi:ex:/usr/bin/nex
vi:ex.1:/usr/share/man/man1/nex.1
vi:vi:/usr/bin/nvi
vi:vi.1:/usr/share/man/man1/nvi.1
vi:view:/usr/bin/nview
vi:view.1:/usr/share/man/man1/nview.1
"
do_configure() {
export OPTFLAG="$CFLAGS"
./configure ${configure_args} --enable-widechar --disable-shared \
vi_cv_path_preserve=/var/tmp --program-prefix=n \
vi_cv_sprintf_count=yes
}
pre_build() {
sed -i -e '/define.*_PATH_MSGCAT/ s/".*"/"\/usr\/share\/vi\/catalog\/"/' pathnames.h
}
post_install() {
vlicense ../LICENSE
# remove cat pages.
rm -rf ${DESTDIR}/usr/share/man/cat1
# remove lib.
rm -f ${DESTDIR}/usr/lib/libvi.a
# remove perl + tcl scripts.
rm -rf ${DESTDIR}/usr/share/vi/perl ${DESTDIR}/usr/share/vi/tcl
}