APKBUILD 1.99 KB
Newer Older
Daniel Sabogal's avatar
Daniel Sabogal committed
1
# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
2
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
3 4 5 6 7 8 9 10 11
#
# secfixes:
#   0.1.6-r1:
#     - CVE-2016-1248
#   0.2.0-r0
#     - CVE-2017-5953
#     - CVE-2017-6349
#     - CVE-2017-6350
#
12
# TODO: Try to trim the base package to include only common syntax files etc.
Daniel Sabogal's avatar
Daniel Sabogal committed
13
pkgname=neovim
14
pkgver=0.2.0
15
pkgrel=0
16
pkgdesc="Vim-fork focused on extensibility and agility"
Daniel Sabogal's avatar
Daniel Sabogal committed
17
url="https://neovim.io"
18
arch="all !s390x" # needs luajit
19
license="ASL-2.0 custom"
Daniel Sabogal's avatar
Daniel Sabogal committed
20
depends=""
21
makedepends="cmake gettext-dev gperf libtermkey-dev libuv-dev libvterm-dev
22
	lua5.1-lpeg lua5.1-mpack luajit-dev msgpack-c-dev unibilium-dev"
23
subpackages="$pkgname-lang $pkgname-doc"
24
source="$pkgname-$pkgver.tar.gz::https://github.com/neovim/$pkgname/archive/v$pkgver.tar.gz
25
	nodoc.txt"
26
builddir="$srcdir/$pkgname-$pkgver"
Daniel Sabogal's avatar
Daniel Sabogal committed
27 28 29 30

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build
31

Daniel Sabogal's avatar
Daniel Sabogal committed
32
	cmake .. \
33
		-DCMAKE_BUILD_TYPE=MinSizeRel \
Daniel Sabogal's avatar
Daniel Sabogal committed
34
		-DCMAKE_INSTALL_PREFIX=/usr \
35 36 37
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DENABLE_JEMALLOC=FALSE \
		-DCMAKE_VERBOSE_MAKEFILE=TRUE \
Daniel Sabogal's avatar
Daniel Sabogal committed
38 39 40 41 42 43
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"/build
44
	make DESTDIR="$pkgdir" install
Daniel Sabogal's avatar
Daniel Sabogal committed
45 46
}

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
doc() {
	default_doc || return 1

	pkgdesc="$pkgdesc (documentation and help pages)"
	replaces="$pkgname"
	local docdir="usr/share/nvim/runtime/doc"

	mkdir -p "$subpkgdir"/$docdir
	mv "$pkgdir"/$docdir/*.txt "$subpkgdir"/$docdir/ || return 1

	# When user execute ":help <pattern>", neovim will open nodoc.txt
	# with information why docs are not available and how to install them.
	install -D "$srcdir"/nodoc.txt \
		"$pkgdir"/$docdir/nodoc.txt || return 1
	local f; for f in "$subpkgdir"/$docdir/*.txt; do
		ln -s nodoc.txt "$pkgdir"/$docdir/$(basename $f) || return 1
	done
}

66
sha512sums="fc4be03c5bee1c9928376938679f9a900f3ee2e58df817d1cb9b5af51350dccca63a7638114b0326ec4565a047faaa4b50fecfc932c1d59ee92efa54625e22cd  neovim-0.2.0.tar.gz
67
72ab288f53acddc088c567aafe8c5afa6835325fab7879e782d1d62f87a662f3a6bac123c450debbae1b32336cc60b2830b429838ee3dfcc7524773b5069f4f0  nodoc.txt"