aboutsummaryrefslogtreecommitdiff
blob: 94675d8f14212c072ae4bcb9f66d50d2b190b84c (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
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="Multi-client, TLS-only IRC bouncer"
HOMEPAGE="https://git.causal.agency/pounce/about/"
SRC_URI="https://git.causal.agency/${PN}/snapshot/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="palaver"

DEPEND="
	dev-libs/libretls:=
	virtual/libcrypt:=
	palaver? (
		dev-db/sqlite:3
		net-misc/curl
	)
"
RDEPEND="${DEPEND}"
BDEPEND="
	virtual/pkgconfig
"

DOCS=( {QUIRKS,README}.7 )

src_configure() {
	local confargs=(
		--prefix="${EPREFIX}/usr"
		--mandir="${EPREFIX}/usr/share/man"
	)

	# note: not an autoconf configure script
	./configure "${confargs[@]}" || die

	pushd extra/notify >/dev/null || die
	./configure "${confargs[@]}" || die
	popd >/dev/null || die

	if use palaver; then
		pushd extra/palaver >/dev/null || die
		./configure "${confargs[@]}" || die
		popd >/dev/null || die
	fi

	tc-export CC
}

src_compile() {
	emake all
	emake -C extra/notify
	use palaver && emake -C extra/palaver
}

src_install() {
	emake DESTDIR="${D}" install
	emake -C extra/notify DESTDIR="${D}" install
	use palaver && emake -C extra/palaver DESTDIR="${D}" install
	einstalldocs

	newinitd "${FILESDIR}"/pounce.initd pounce
	newconfd "${FILESDIR}"/pounce.confd pounce

	insinto /etc/pounce
	doins "${FILESDIR}"/example.conf
}