2022-06-06 13:52:59 +02:00
|
|
|
# Copyright 2021-2022 Gentoo Authors
|
2021-02-26 21:32:04 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2022-06-06 13:52:59 +02:00
|
|
|
EAPI="8"
|
2021-02-26 21:32:04 +01:00
|
|
|
|
|
|
|
inherit vim-plugin
|
|
|
|
|
|
|
|
DESCRIPTION="vim plugin: Personal Wiki"
|
|
|
|
HOMEPAGE="https://github.com/vimwiki/vimwiki"
|
|
|
|
LICENSE="MIT"
|
|
|
|
IUSE="test"
|
|
|
|
RESTRICT="!test? ( test )"
|
|
|
|
|
|
|
|
if [[ ${PV} == *9999 ]]
|
|
|
|
then
|
|
|
|
inherit git-r3
|
|
|
|
EGIT_REPO_URI="https://github.com/vimwiki/vimwiki.git"
|
|
|
|
else
|
|
|
|
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
fi
|
|
|
|
|
|
|
|
DOCS=(
|
|
|
|
CONTRIBUTING.md
|
|
|
|
DesignNotes.md
|
|
|
|
README.md
|
|
|
|
README-cn.md
|
|
|
|
)
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
default
|
|
|
|
|
|
|
|
if ! use test; then
|
2021-07-12 19:23:24 +02:00
|
|
|
rm -r test Dockerfile || die
|
2021-02-26 21:32:04 +01:00
|
|
|
fi
|
|
|
|
# We store the appropriate license information inside the portage tree.
|
2021-07-12 19:23:24 +02:00
|
|
|
rm -r LICENSE.md || die
|
2021-02-26 21:32:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
|
|
|
# ^this is a new installation, so:
|
|
|
|
elog ""
|
|
|
|
elog "Please ensure that you have set the following in your vimrc:"
|
|
|
|
elog "set nocompatible"
|
|
|
|
elog "set filetype plugin on"
|
|
|
|
elog "syntax on"
|
|
|
|
elog "For details see https://github.com/vimwiki/vimwiki#prerequisites"
|
|
|
|
fi
|
|
|
|
}
|