summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD42
-rw-r--r--fixerrors.patch16
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f29a2cd9ac1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = nvi
+ pkgdesc = The Berkeley Vi Editor
+ pkgver = 1.79
+ pkgrel = 1
+ url = https://sites.google.com/a/bostic.com/keithbostic/vi
+ arch = i686
+ arch = x86_64
+ license = BSD
+ depends = libtool
+ depends = ncurses
+ source = https://sites.google.com/a/bostic.com/keithbostic/files/nvi-1.79.tar.gz
+ source = fixerrors.patch
+ md5sums = 765e2153f5fc4f21793f2edc2647305a
+ md5sums = c57d0dfb738d292d95a547029b6f6c86
+
+pkgname = nvi
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7c2a03ca58e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: 10sr <8slashes+arch [at] gmail [dot] com>
+
+pkgname=nvi
+pkgver=1.79
+pkgrel=1
+pkgdesc="The Berkeley Vi Editor"
+arch=('i686' 'x86_64')
+url="https://sites.google.com/a/bostic.com/keithbostic/vi"
+license=('BSD')
+depends=('libtool' 'ncurses')
+source=("https://sites.google.com/a/bostic.com/keithbostic/files/$pkgname-$pkgver.tar.gz"
+ "fixerrors.patch")
+md5sums=('765e2153f5fc4f21793f2edc2647305a'
+ 'c57d0dfb738d292d95a547029b6f6c86')
+
+
+prepare(){
+ # http://www.yansite.jp/jnvi.html
+ cd "$srcdir"/"$pkgname"-"$pkgver"
+ patch -p1 <../fixerrors.patch
+ cd "$srcdir"/"$pkgname"-"$pkgver"/build
+ cp -pf /usr/share/libtool/build-aux/config.guess .
+ cp -pf /usr/share/libtool/build-aux/config.sub .
+}
+
+build(){
+ export CPPFLAGS="${CPPFLAGS} -U_FORTIFY_SOURCE"
+ cd "$srcdir"/"$pkgname"-"$pkgver"/build
+ ./configure --prefix="$pkgdir"/usr --program-prefix=n \
+ --disable-curses --disable-re
+ make
+}
+
+package(){
+ cd "$srcdir"/"$pkgname"-"$pkgver"/build
+
+ make install
+
+ # license
+ install -Dm644 "$srcdir"/"$pkgname"-"$pkgver"/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/fixerrors.patch b/fixerrors.patch
new file mode 100644
index 00000000000..952046104b6
--- /dev/null
+++ b/fixerrors.patch
@@ -0,0 +1,16 @@
+Fix errors in Makefile.in
+Actually I cannot understand why this could happen.
+
+--- nvi-1.79.old/build/Makefile.in 1996-10-23 22:43:38.000000000 +0900
++++ nvi-1.79.new/build/Makefile.in 2015-09-05 23:55:22.340436768 +0900
+@@ -139,8 +139,8 @@
+ cd $(datadir)/vi/catalog && $(chmod) $(fmode) *)
+ @echo "Installing Perl scripts: $(datadir)/vi/perl ..."
+ $(mkdir) $(datadir)/vi/perl && $(chmod) $(dmode) $(datadir)/vi/perl
+- [ -f VI.pm ] && $(cp) VI.pm $(datadir)/vi/perl && \
+- cd $(datadir)/vi/perl && $(chmod) $(fmode) VI.pm)
++ -[ -f VI.pm ] && $(cp) VI.pm $(datadir)/vi/perl && \
++ cd $(datadir)/vi/perl && $(chmod) $(fmode) VI.pm
+ (cd $(srcdir)/perl_scripts && $(cp) *.pl $(datadir)/vi/perl && \
+ cd $(datadir)/vi/perl && $(chmod) $(fmode) *.pl)
+ @echo "Installing Tcl scripts: $(datadir)/vi/tcl ..."