# Template file for 'dhcpcd'
pkgname=dhcpcd
version=10.1.0
revision=1
build_style=configure
make_check_target=test
configure_args="
 --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --rundir=/run/dhcpcd
 $(vopt_if privsep --privsepuser=_dhcpcd) $(vopt_enable privsep)"
hostmakedepends="ntp pkg-config"
makedepends="eudev-libudev-devel"
short_desc="RFC2131 compliant DHCP client"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="https://roy.marples.name/projects/dhcpcd"
changelog="https://github.com/NetworkConfiguration/dhcpcd/releases"
distfiles="https://github.com/NetworkConfiguration/dhcpcd/archive/refs/tags/v${version}.tar.gz"
checksum=e8a83208c2ff63a5a31d886f76bc717b4ec1938d18a2c8b88f328e710d2b515a
lib32disabled=yes
conf_files=/etc/dhcpcd.conf

system_accounts="_dhcpcd"
_dhcpcd_homedir="/var/db/dhcpcd"

build_options="privsep"
desc_option_privsep="Enable privilege separation mode for the daemon"

post_install() {
	vsv dhcpcd
	vsv dhcpcd-eth0

	# Enable controlgroup by default, to make dhcpcd-ui work.
	vsed -e 's,^#\(controlgroup.*\),\1,' -i ${DESTDIR}/etc/dhcpcd.conf

	# License
	vlicense LICENSE
}
