From f21f8030e560b21805e14c35e14a295ba504ea6b Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 30 Oct 2015 16:09:40 +0100 Subject: [PATCH] ex-vi: set alternatives for ex, vi and view. --- srcpkgs/ex-vi/template | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/srcpkgs/ex-vi/template b/srcpkgs/ex-vi/template index 406213161b5..0f0b8b4b579 100644 --- a/srcpkgs/ex-vi/template +++ b/srcpkgs/ex-vi/template @@ -1,15 +1,13 @@ # Template file for 'ex-vi' pkgname=ex-vi version=050325 -revision=5 +revision=6 wrksrc="ex-${version}" build_style=gnu-makefile make_build_args="PREFIX=/usr TERMLIB=ncurses PRESERVEDIR=/var/tmp LARGEF=-DLARGEF" make_install_args="INSTALL=/usr/bin/install PRESERVEDIR=/var/tmp STRIP=" CFLAGS=-I. makedepends="ncurses-devel" -replaces="nvi>=0" -provides="nvi-${version}_${revision}" short_desc="The original ex/vi text editor (Heirloom version)" maintainer="Christian Neukirchen " license="BSD" @@ -18,8 +16,23 @@ distfiles="${SOURCEFORGE_SITE}/$pkgname/ex-${version}.tar.bz2" checksum=da4be7cf67e94572463b19e56850aa36dc4e39eb0d933d3688fe8574bb632409 disable_parallel_build=yes +alternatives=" + ex:/usr/bin/ex:/usr/bin/ex-ex + ex:/usr/share/man/man1/ex.1:/usr/share/man/man1/ex-ex.1 + vi:/usr/bin/vi:/usr/bin/ex-vi + vi:/usr/share/man/man1/vi.1:/usr/share/man/man1/ex-vi.1 + view:/usr/bin/view:/usr/bin/ex-view + view:/usr/share/man/man1/view.1:/usr/share/man/man1/ex-view.1 +" + post_install() { vlicense LICENSE - rm ${DESTDIR}/usr/bin/edit - rm ${DESTDIR}/usr/share/man/man1/edit.1 + rm ${DESTDIR}/usr/share/man/man1/*edit.1 + rm ${DESTDIR}/usr/bin/*edit ${DESTDIR}/usr/bin/vi ${DESTDIR}/usr/bin/view + ln -sf ex-ex ${DESTDIR}/usr/bin/ex-vi + ln -sf ex-ex ${DESTDIR}/usr/bin/ex-view + mv ${DESTDIR}/usr/bin/ex ${DESTDIR}/usr/bin/ex-ex + mv ${DESTDIR}/usr/share/man/man1/ex.1 ${DESTDIR}/usr/share/man/man1/ex-ex.1 + mv ${DESTDIR}/usr/share/man/man1/vi.1 ${DESTDIR}/usr/share/man/man1/ex-vi.1 + ln -sf ex-vi.1 ${DESTDIR}/usr/share/man/man1/ex-view.1 }