aboutsummaryrefslogtreecommitdiffstats
path: root/community/neovim/APKBUILD
blob: a5b6f56f8dd6462200d9a5667f96c1fe0a0fdafe (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
# TODO: Try to trim the base package to include only common syntax files etc.
pkgname=neovim
pkgver=0.1.7
pkgrel=0
pkgdesc="Vim-fork focused on extensibility and agility"
url="https://neovim.io"
arch="all"
license="ASL-2.0 custom"
depends=""
makedepends="cmake gettext-dev gperf libtermkey-dev libuv-dev libvterm-dev
	lua5.1-lpeg lua5.1-mpack luajit-dev msgpack-c-dev unibilium-dev"
subpackages="$pkgname-lang $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/neovim/$pkgname/archive/v$pkgver.tar.gz
	nodoc.txt"
builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   0.1.6-r1:
#     - CVE-2016-1248

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

	cmake .. \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DENABLE_JEMALLOC=FALSE \
		-DCMAKE_VERBOSE_MAKEFILE=TRUE \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

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="f3acb6181f6888b620d11d1822fad982  neovim-0.1.7.tar.gz
c910a91b399ebbd498cf6f96ce247cb6  nodoc.txt"
sha256sums="d8f885d019b1ad608f36ae23b8f1b15b7e33585e16f7514666ab6c9809bb4b7e  neovim-0.1.7.tar.gz
7ecadab8a847334060eb1f16e5c0cec6e12e183d8695f6f924429184cd22e463  nodoc.txt"
sha512sums="f7dbac4b2090fbf9764585ebf147c529b655d6e30cca9404cd161e2bd78f3aaa2f714d86a8c3efd1935dc92363757c381833d0059043807db0bea3db2fc6d10c  neovim-0.1.7.tar.gz
72ab288f53acddc088c567aafe8c5afa6835325fab7879e782d1d62f87a662f3a6bac123c450debbae1b32336cc60b2830b429838ee3dfcc7524773b5069f4f0  nodoc.txt"