summaryrefslogtreecommitdiff
path: root/libre-testing/vi/PKGBUILD
blob: dc7860a51a8f6d53de2506682e09ac4d7eccc739 (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
43
44
45
46
47
48
49
50
51
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgname=vi
pkgver=070224
pkgrel=3
epoch=1
pkgdesc="The original ex/vi text editor"
arch=('x86_64' 'ppc64le')
url="http://ex-vi.sourceforge.net/"
license=('custom:ex')
groups=('base')
depends=('ncurses')
optdepends=('s-nail: used by the preserve command for notification')
source=(https://sources.archlinux.org/other/$pkgname/ex-$pkgver.tar.xz{,.sig}
        fix-tubesize-short-overflow.patch
        navkeys.patch
        preserve-dir.patch)
sha256sums=('c3e52dd44edd1f6bf0b52207f717c56149dc50aac0d131fff3851d589727f52f'
            'SKIP'
            '42167fabebe30a13d594346b1d254db82090ba41742a9f35b8895d37092053f0'
            '0e9e2d381f1d8cb86daae68462b3849825b003c08007725c0db9939d3d5bf58d'
            'f0ef9ed2ccea98bf47b08dd3faa2abb911b4e6c0579f5294e9d0e8742282ff65')
validpgpkeys=('86CFFCA918CF3AF47147588051E8B148A9999C34')

prepare() {
  cd ex-$pkgver

  patch -Np1 -i ../fix-tubesize-short-overflow.patch
  patch -Np1 -i ../navkeys.patch

  # https://bugs.archlinux.org/task/20653
  patch -Np1 -i ../preserve-dir.patch
}

build() {
  cd ex-$pkgver

  make PREFIX=/usr LIBEXECDIR=/usr/lib/ex PRESERVEDIR=/var/lib/ex \
    TERMLIB=ncurses FEATURES="-DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8"
}

package() {
  cd ex-$pkgver

  make PREFIX=/usr LIBEXECDIR=/usr/lib/ex PRESERVEDIR=/var/lib/ex \
    INSTALL=/usr/bin/install DESTDIR="$pkgdir" install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: