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

EAPI=7
inherit readme.gentoo-r1 systemd

DESCRIPTION="Portable DHCPv6 implementation (server, client and relay)"
HOMEPAGE="http://klub.com.pl/dhcpv6/"
SRC_URI="http://klub.com.pl/dhcpv6/dibbler/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 ~hppa ~mips x86"
IUSE="doc resolvconf"

RDEPEND="resolvconf? ( virtual/resolvconf )"
DEPEND="${RDEPEND}
	doc? ( dev-texlive/texlive-latexextra )"

PATCHES=( "${FILESDIR}"/${P}-fno-common.patch
	"${FILESDIR}"/${P}-gnu-ism.patch
	)

DOC_CONTENTS="Make sure that you modify client.conf, server.conf and/or relay.conf
to suit your needs. They are stored in /etc/dibbler"

src_configure() {
	econf $(use_enable resolvconf)
}

src_compile() {
	default
	# devel documentation is broken and users should consult the online version
	# http://klub.com.pl/dhcpv6/doxygen/
	use doc && emake -C doc/ user
}

src_install() {
	default
	readme.gentoo_create_doc

	dosbin dibbler-{client,relay,server}
	doman doc/man/*.8

	insinto /etc/dibbler
	doins doc/examples/*.conf
	keepdir /var/lib/dibbler

	dodoc AUTHORS CHANGELOG RELNOTES TODO
	use doc && dodoc doc/dibbler-user.pdf

	doinitd "${FILESDIR}"/dibbler-{client,relay,server}
	systemd_dounit "${FILESDIR}"/dibbler-client.service
}

pkg_postinst() {
	readme.gentoo_print_elog
}