blob: 0966edd1b8356ea79a0c5788d2220310d3c0a376 [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001SECTION = "console/network"
2SUMMARY = "dhcpcd - a DHCP client"
3DESCRIPTION = "dhcpcd runs on your machine and silently configures your \
4 computer to work on the attached networks without trouble \
5 and mostly without configuration."
6
7HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
8
9LICENSE = "BSD-2-Clause"
Patrick Williamse760df82023-05-26 11:10:49 -050010LIC_FILES_CHKSUM = "file://LICENSE;md5=ba9c7e534853aaf3de76c905b2410ffd"
Andrew Geisslereff27472021-10-29 15:35:00 -050011
Patrick Williamse760df82023-05-26 11:10:49 -050012SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \
Andrew Geisslereff27472021-10-29 15:35:00 -050013 file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
Andrew Geissler517393d2023-01-13 08:55:19 -060014 file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \
Andrew Geisslereff27472021-10-29 15:35:00 -050015 file://dhcpcd.service \
16 file://dhcpcd@.service \
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050017 file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \
Andrew Geissler5082cc72023-09-11 08:41:39 -040018 file://0001-privsep-fix-strlcpy-overflow-in-psp_ifname-239.patch \
Andrew Geisslereff27472021-10-29 15:35:00 -050019 "
20
Andrew Geissler5082cc72023-09-11 08:41:39 -040021SRCREV = "d2fbde99cf2d0072016af9dfe6a77032a5a9fc30"
Andrew Geissler028142b2023-05-05 11:29:21 -050022S = "${WORKDIR}/git"
Andrew Geisslereff27472021-10-29 15:35:00 -050023
24inherit pkgconfig autotools-brokensep systemd useradd
25
26SYSTEMD_SERVICE:${PN} = "dhcpcd.service"
27
28PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
29
30PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev"
31PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
32# ntp conflicts with chrony
33PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp"
34PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony"
35PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt"
36
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000037# add option to override DBDIR location
38DBDIR ?= "${localstatedir}/lib/${BPN}"
39
Andrew Geisslereff27472021-10-29 15:35:00 -050040EXTRA_OECONF = "--enable-ipv4 \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000041 --dbdir=${DBDIR} \
Andrew Geisslereff27472021-10-29 15:35:00 -050042 --sbindir=${base_sbindir} \
43 --runstatedir=/run \
44 --enable-privsep \
45 --privsepuser=dhcpcd \
46 --with-hooks \
47 --with-eghooks \
48 "
49
50USERADD_PACKAGES = "${PN}"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000051USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd"
Andrew Geisslereff27472021-10-29 15:35:00 -050052
53do_install:append () {
54 # install systemd unit files
55 install -d ${D}${systemd_system_unitdir}
56 install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir}
57
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000058 chmod 700 ${D}${DBDIR}
59 chown dhcpcd:dhcpcd ${D}${DBDIR}
Andrew Geisslereff27472021-10-29 15:35:00 -050060}
61
62FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"