summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7c2a03ca58e81d76f04fb3b4039db791bf06d7c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
}