aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-11-05 01:46:33 +0100
committerJakub Jirutka <jakub@jirutka.cz>2016-11-05 01:50:35 +0100
commit8507e09ffed5dd006a0c6ebe13a27da82c3592d6 (patch)
treebfe859d4c746f2815567cd2fb3a534c0ab467dc6
parent402ffdcb7c66a3aca41f321da8f9c8d9e73b50d0 (diff)
downloadaports-8507e09ffed5dd006a0c6ebe13a27da82c3592d6.tar.bz2
aports-8507e09ffed5dd006a0c6ebe13a27da82c3592d6.tar.xz
testing/neovim: move runtime/doc into -doc subpackage
-rw-r--r--testing/neovim/APKBUILD32
-rw-r--r--testing/neovim/nodoc.txt12
2 files changed, 40 insertions, 4 deletions
diff --git a/testing/neovim/APKBUILD b/testing/neovim/APKBUILD
index 7ec08f4c0..f5190e0be 100644
--- a/testing/neovim/APKBUILD
+++ b/testing/neovim/APKBUILD
@@ -1,5 +1,6 @@
# 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.6
pkgrel=0
@@ -11,7 +12,8 @@ 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"
+source="$pkgname-$pkgver.tar.gz::https://github.com/neovim/$pkgname/archive/v$pkgver.tar.gz
+ nodoc.txt"
builddir="$srcdir/$pkgname-$pkgver"
build() {
@@ -33,6 +35,28 @@ package() {
make DESTDIR="$pkgdir" install
}
-md5sums="307978937c7fc2ebd796b345d99ed7cd neovim-0.1.6.tar.gz"
-sha256sums="a9fe7aadd38ef015f82ec340f6b6c0629d02c9ca4d85352db0934ae511d2f02a neovim-0.1.6.tar.gz"
-sha512sums="360d69bc11a3cb7b2c203adc7e76edad736b1a2fb7033d2d0c6444da168053ea0b621daf7978e9c158e14c5e04af8599005bf5eb800d9d1776007257b0e0e56f neovim-0.1.6.tar.gz"
+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
+c910a91b399ebbd498cf6f96ce247cb6 nodoc.txt"
+sha256sums="a9fe7aadd38ef015f82ec340f6b6c0629d02c9ca4d85352db0934ae511d2f02a neovim-0.1.6.tar.gz
+7ecadab8a847334060eb1f16e5c0cec6e12e183d8695f6f924429184cd22e463 nodoc.txt"
+sha512sums="360d69bc11a3cb7b2c203adc7e76edad736b1a2fb7033d2d0c6444da168053ea0b621daf7978e9c158e14c5e04af8599005bf5eb800d9d1776007257b0e0e56f neovim-0.1.6.tar.gz
+72ab288f53acddc088c567aafe8c5afa6835325fab7879e782d1d62f87a662f3a6bac123c450debbae1b32336cc60b2830b429838ee3dfcc7524773b5069f4f0 nodoc.txt"
diff --git a/testing/neovim/nodoc.txt b/testing/neovim/nodoc.txt
new file mode 100644
index 000000000..cad14d90e
--- /dev/null
+++ b/testing/neovim/nodoc.txt
@@ -0,0 +1,12 @@
+*nodocs.txt* {Nvim}
+
+ DOCS NOT INSTALLED
+
+Alpine separates neovim's documentation pages into package neovim-doc,
+to keep the base package small.
+
+If you want to install them, run:
+
+ apk add neovim-doc
+
+ vim:tw=78:ts=8:ft=help:norl: