summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--packaging/vi.manifest5
-rw-r--r--packaging/vi.spec53
3 files changed, 61 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b3e01ea..b18699f 100644
--- a/Makefile
+++ b/Makefile
@@ -79,7 +79,7 @@
# Destinations for installation. $(PRESERVEDIR) is used for recovery files.
# It will get mode 1777.
#
-PREFIX = /usr/local
+PREFIX = /usr
BINDIR = $(PREFIX)/bin
LIBEXECDIR = $(PREFIX)/libexec
MANDIR = $(PREFIX)/share/man
@@ -94,7 +94,7 @@ DESTDIR =
#
# A BSD-like install program. GNU install will fit well here, too.
#
-INSTALL = /usr/ucb/install
+INSTALL = /usr/bin/install
#
# Compiler and linker flags.
@@ -235,7 +235,7 @@ MALLOC=mapmalloc.o
#WARN = -Wall -Wno-parentheses -Werror
-STRIP = -s
+STRIP =
RECOVER = -DEXRECOVER=\"$(LIBEXECDIR)/exrecover\" \
-DEXPRESERVE=\"$(LIBEXECDIR)/expreserve\"
CCFLAGS = $(CFLAGS) $(WARN) $(CPPFLAGS) $(FEATURES) $(CHARSET) $(OSTYPE) \
diff --git a/packaging/vi.manifest b/packaging/vi.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/vi.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/vi.spec b/packaging/vi.spec
new file mode 100644
index 0000000..c71fe57
--- /dev/null
+++ b/packaging/vi.spec
@@ -0,0 +1,53 @@
+Name: vi
+Version: 050325
+Release: 1
+License: BSD-4-Clause-UC and BSD-4-Clause-Caldera
+
+Summary: The Traditional Vi
+
+Url: http://ex-vi.sourceforge.net/
+Group: Base/Utilities
+Source: http://prdownloads.sourceforge.net/ex-vi/ex-%{version}.tar.bz2
+Source1: vi.manifest
+BuildRequires: gcc
+BuildRequires: make
+BuildRequires: glibc-devel >= 2.2.2
+BuildRequires: ncurses-devel
+Conflicts: vim-base
+
+%description
+Compared to most of its many clones, the traditional vi is a rather small
+program just with its extremely powerful editing interface, but lacking fancy
+features like multiple undo, multiple screens, or syntax highlighting.
+This port of vi has generally preserved the original style, terminal control,
+and feature set. It adds support for international character sets, including
+multibyte encodings such as UTF-8, and some minor enhancements that were not
+present in BSD vi 3.7, but had been included in later vi versions for System V
+or in POSIX.2.
+
+%prep
+%setup -q -n ex-%{version}
+
+cp %{SOURCE1} .
+
+%build
+export CFLAGS="%{optflags} -Wall -pipe -fno-strict-aliasing"
+export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=1}
+
+make
+
+%install
+%make_install
+
+rm -Rf %{buildroot}%{_mandir}
+
+%files
+%defattr(-,root,root,-)
+%manifest vi.manifest
+%{_bindir}/edit
+%{_bindir}/ex
+%{_bindir}/vedit
+%{_bindir}/vi
+%{_bindir}/view
+%{_libexecdir}/expreserve
+%{_libexecdir}/exrecover