summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lua/luacheck/luacheck-0.22.0.ebuild')
-rw-r--r--dev-lua/luacheck/luacheck-0.22.0.ebuild44
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-lua/luacheck/luacheck-0.22.0.ebuild b/dev-lua/luacheck/luacheck-0.22.0.ebuild
new file mode 100644
index 0000000..29203ab
--- /dev/null
+++ b/dev-lua/luacheck/luacheck-0.22.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+LUA_COMPAT="lua51 luajit2"
+inherit lua
+
+DESCRIPTION="A tool for linting and static analysis of Lua code"
+HOMEPAGE="https://github.com/mpeterv/luacheck"
+SRC_URI="https://github.com/mpeterv/luacheck/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc test"
+
+RDEPEND="
+ dev-lua/luafilesystem
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )
+ test? ( dev-lua/busted )"
+
+DOCS=( CHANGELOG.md README.md )
+
+all_lua_compile() {
+ if use doc; then
+ sphinx-build docsrc html || die
+ fi
+}
+
+each_lua_test() {
+ busted -o gtest || die
+}
+
+each_lua_install() {
+ dolua src/luacheck
+}
+all_lua_install() {
+ newbin bin/luacheck.lua luacheck
+ use doc && HTML_DOCS+=( html/. )
+ einstalldocs
+}