core/vi/PKGBUILD
Jan Mette a20ff5c68a
2010-03-13 15:25:19 +00:00

37 lines
1.5 KiB
Bash

# $Id: PKGBUILD 67889 2010-02-09 12:02:26Z paul $
# Maintainer: tobias [ tobias at archlinux org ]
pkgname=vi
pkgver=050325
pkgrel=2
pkgdesc='The original ex/vi text editor.'
arch=('i686' 'x86_64')
url='http://ex-vi.sourceforge.net/'
license=('custom:ex')
depends=('ncurses')
groups=('base')
options=(force strip !libtool emptydirs)
source=(http://downloads.sourceforge.net/sourceforge/ex-vi/ex-${pkgver}.tar.bz2
du.patch increase-tube.patch exrc.sample)
md5sums=('e668595254233e4d96811083a3e4e2f3' '2d80fbc7d612963466d9ae45058a3778' \
'e596e05a00a24187b576e389fa1de45d' 'd3b483c994d859232ce369b82a4b5668')
build() {
cd ${srcdir}/ex-${pkgver}
sed -i -e 's/^PREFIX.*$/PREFIX = \/usr/' Makefile
sed -i -e 's/^LIBEXECDIR.*$/LIBEXECDIR = $(PREFIX)\/lib\/ex/' Makefile
sed -i -e 's/^PRESERVEDIR.*$/PRESERVEDIR = \/var\/lib\/ex/' Makefile
sed -i -e 's/^DESTDIR.*$/DESTDIR = ..\/..\/pkg/' Makefile
sed -i -e 's/^INSTALL.*$/INSTALL = \/bin\/install/' Makefile
sed -i -e 's/^FEATURES.*$/FEATURES = -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8/' Makefile
sed -i -e 's/^TERMLIB.*$/TERMLIB = ncurses/' Makefile
sed -i -e 's/^\.B \/usr\/libexec/.B \/usr\/lib\/ex/' vi.1
sed -i -e 's/^\.B \/var\/preserve$/.B \/var\/lib\/ex/' vi.1
patch -Np1 -i ../du.patch || return 1
patch -Np0 -i ../increase-tube.patch || return 1
make || return 1
make install
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/vi/LICENSE
install -D -m644 ${srcdir}/exrc.sample ${pkgdir}/etc/exrc.sample
}