aboutsummaryrefslogtreecommitdiff
path: root/app-portage/puppy/puppy-9999.ebuild
blob: 303132060771f9cd5d770a1aca464b9458bbd0cb (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
51
52
53
54
55
56
57
58
59
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..13} )

inherit python-single-r1 systemd

DESCRIPTION="Utility for compiling packages on remote hosts using Portage"
HOMEPAGE="https://gitlab.com/doasu/puppy"

if [[ ${PV} == 9999 ]]; then
	EGIT_REPO_URI="https://gitlab.com/doasu/${PN}.git"
	EGIT_BRANCH="unittest"
	inherit git-r3
else
	SRC_URI="https://gitlab.com/doasu/${PN}/-/archive/${PV}/${P}.tar.bz2"
	KEYWORDS="~amd64"
fi

LICENSE="AGPL-3"
SLOT="0"
IUSE="+client +server test"
REQUIRED_USE="
	|| ( client server )
	${PYTHON_REQUIRED_USE}
"
RESTRICT="!test? ( test )"

RDEPEND="
	sys-apps/portage
	${PYTHON_DEPS}

	test? ( dev-python/unittest-or-fail[${PYTHON_SINGLE_USEDEP}] )
"
DEPEND="${RDEPEND}"

src_test() {
	eunittest
}

src_install() {
	python_domodule _common.py
	python_domodule _request.py

	if use server; then
		python_doscript puppyd

		newconfd "${S}/packaging/puppyd.conf.d" puppyd
		newinitd "${S}/packaging/puppyd.init.d" puppyd

		systemd_newunit packaging/puppyd.service puppyd.service
	fi

	if use client; then
		python_doscript pup.py
	fi
}