nvi/nvi.spec

Name: nvi
Summary: Berkeley VI Editor
Version: 1.81.6
Release: 1
License: BSD
Group: Applications/Editors
URL: http://www.bostic.com/vi/
Description: Nvi is an implementation of the ex/vi text editor originally distributed as part of the Fourth Berkeley Software Distribution (4BSD), by the University of California, Berkeley.

CentOS 7 x86_64

The build could not start because the following file is missing: nvi-1.81.6.tar.bz2

Build Status

CentOS 6 x86_64

The build could not start because the following file is missing: nvi-1.81.6.tar.bz2

Build Status

Contents

The spec file used by the build system currently has the following contents:

# $Id$
# Authority: dag

%define _bindir /bin

Summary: Berkeley VI Editor
Name: nvi
Version: 1.81.6
Release: 1%{?dist}
License: BSD
Group: Applications/Editors
URL: http://www.bostic.com/vi/

Source: ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/nvi/nvi-%{version}.tar.bz2
Patch0: build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
Nvi is an implementation of the ex/vi text editor originally distributed
as part of the Fourth Berkeley Software Distribution (4BSD), by
the University of California, Berkeley.

%prep
%setup
#patch0 -p0

%build
cd dist/
%configure \
    --program-prefix="n" \
    --disable-curses
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__install} -dp -m0755 %{buildroot}
%{__make} -C dist install DESTDIR="%{buildroot}"

%post
if [ -x /usr/sbin/alternatives ]; then
    /usr/sbin/alternatives --install /etc/alternatives/ex ex %{_bindir}/nex 20 --slave /etc/alternatives/nex.1.gz ex.1.gz %{_mandir}/man1/nex.1.gz
    /usr/sbin/alternatives --install /etc/alternatives/vi vi %{_bindir}/nvi 20 --slave /etc/alternatives/vi.1.gz vi.1.gz %{_mandir}/man1/nvi.1.gz
    /usr/sbin/alternatives --install /etc/alternatives/view view %{_bindir}/nview 20 --slave /etc/alternatives/view.1.gz view.1.gz %{_mandir}/man1/nview.1.gz
fi

%postun
if [ -x /usr/sbin/alternatives ]; then
    /usr/sbin/alternatives --remove vi %{_bindir}/nex
    /usr/sbin/alternatives --remove vi %{_bindir}/nvi
    /usr/sbin/alternatives --remove view %{_bindir}/nview
fi

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc FAQ LAYOUT LICENSE README docs/changelog docs/features docs/TODO docs/tutorial/
%doc %{_mandir}/man1/nex.1*
%doc %{_mandir}/man1/nvi.1*
%doc %{_mandir}/man1/nview.1*
%{_bindir}/nex
%{_bindir}/nvi
%{_bindir}/nview
%{_datadir}/vi/

%changelog
* Sat Nov 08 2008 Dag Wieers <dag@wieers.com> - 1.81.6-1
- Updated to release 1.81.6.

* Thu Jan 10 2008 Mikel Ward <mward@aconex.com> - 1.97-1
- Install binaries in /bin instead of /usr/bin
- Add /etc/alternatives links
- Don't install cat pages