summaryrefslogtreecommitdiff
blob: 80b189a914d4175834f00a16fd2a873885d27990 (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
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake systemd

MY_PV="$(ver_rs 3 '-')"

DESCRIPTION="ttyd, a simple command-line tool for sharing terminal over the web"
HOMEPAGE="https://github.com/tsl0922/ttyd"

if [[ ${PV} == "9999" ]]; then
	EGIT_REPO_URI="https://github.com/tsl0922/ttyd.git"
	inherit git-r3
else
	SRC_URI="https://github.com/tsl0922/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi

LICENSE="MIT"
SLOT="0"

BDEPEND="dev-util/cmake"

DEPEND="
	dev-libs/json-c:=
	dev-libs/libuv:=
	net-libs/libwebsockets:=[libuv,ssl]
	sys-libs/zlib:=
	"

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

src_install() {
	dobin ../${P}_build/${PN}
	doman man/*.1
	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
	newconfd "${FILESDIR}/${PN}.confd" "${PN}"
	systemd_dounit "${FILESDIR}"/${PN}.service
}