APKBUILD 2.47 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
# TODO: Try to trim the base package to include only common syntax files etc.
Daniel Sabogal's avatar
Daniel Sabogal committed
4
pkgname=neovim
5
pkgver=0.1.6
6
pkgrel=1
7
pkgdesc="Vim-fork focused on extensibility and agility"
Daniel Sabogal's avatar
Daniel Sabogal committed
8 9
url="https://neovim.io"
arch="all"
10
license="ASL-2.0 custom"
Daniel Sabogal's avatar
Daniel Sabogal committed
11
depends=""
12
makedepends="cmake gettext-dev gperf libtermkey-dev libuv-dev libvterm-dev
13
	lua5.1-lpeg lua5.1-mpack luajit-dev msgpack-c-dev unibilium-dev"
14
subpackages="$pkgname-lang $pkgname-doc"
15
source="$pkgname-$pkgver.tar.gz::https://github.com/neovim/$pkgname/archive/v$pkgver.tar.gz
16 17
	nodoc.txt
	CVE-2016-1248.patch"
18
builddir="$srcdir/$pkgname-$pkgver"
Daniel Sabogal's avatar
Daniel Sabogal committed
19

20 21 22 23
# secfixes:
#   0.1.6-r1:
#     - CVE-2016-1248

Daniel Sabogal's avatar
Daniel Sabogal committed
24 25 26
build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build
27

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

package() {
	cd "$builddir"/build
40
	make DESTDIR="$pkgdir" install
Daniel Sabogal's avatar
Daniel Sabogal committed
41 42
}

43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
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
}

md5sums="307978937c7fc2ebd796b345d99ed7cd  neovim-0.1.6.tar.gz
63 64
c910a91b399ebbd498cf6f96ce247cb6  nodoc.txt
62fa2153774023d9a9882c4f5987911c  CVE-2016-1248.patch"
65
sha256sums="a9fe7aadd38ef015f82ec340f6b6c0629d02c9ca4d85352db0934ae511d2f02a  neovim-0.1.6.tar.gz
66 67
7ecadab8a847334060eb1f16e5c0cec6e12e183d8695f6f924429184cd22e463  nodoc.txt
8182111c741004de62543050958b535d300969ab395a0853cfe38e1d7adfc1aa  CVE-2016-1248.patch"
68
sha512sums="360d69bc11a3cb7b2c203adc7e76edad736b1a2fb7033d2d0c6444da168053ea0b621daf7978e9c158e14c5e04af8599005bf5eb800d9d1776007257b0e0e56f  neovim-0.1.6.tar.gz
69 70
72ab288f53acddc088c567aafe8c5afa6835325fab7879e782d1d62f87a662f3a6bac123c450debbae1b32336cc60b2830b429838ee3dfcc7524773b5069f4f0  nodoc.txt
0bc6db4051564e4a2146e403c0a3f7128457b5190594ac570f51f787d6f70e80d692b7c1d3431273f6bc4a7edf24f6978590953fce6fc935c12ceb07d5c6bd92  CVE-2016-1248.patch"