summaryrefslogtreecommitdiff
path: root/dev-lua/hump/hump-0.4.2.ebuild
blob: f182674f110a55074243b8bdade492a48ff86f69 (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
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

LUA_COMPAT=( lua5-{1,3,4} luajit )

inherit lua

DESCRIPTION="Helper Utilities for a Multitude of Problems"
HOMEPAGE="http://hump.readthedocs.org/"
HOMEPAGE+=" https://github.com/vrld/hump/"
EGIT_COMMIT="08937cc0ecf72d1a964a8de6cd552c5e136bf0d4"
SRC_URI="https://github.com/vrld/hump/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"

S="${WORKDIR}/${PN}-${EGIT_COMMIT}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

IUSE="doc"
REQUIRED_USE="${LUA_REQUIRED_USE}"

DEPEND="${LUA_DEPS}"
RDEPEND="${DEPEND}"
BDEPEND="
	doc? (
		dev-python/sphinx
		dev-python/sphinx-rtd-theme
	)
"

src_compile() {
	use doc && emake -C docs/ man html
}

lua_src_install() {
	insinto $(lua_get_lmod_dir)/hump/
	doins *.lua
}

src_install() {
	lua_foreach_impl lua_src_install
	if use doc; then
		doman docs/_build/man/hump.1
		local HTML_DOCS=( docs/_build/html/. )
	fi
	einstalldocs
}