blob: de007a6e6c4a6e00a69e368fadfeb81f7bace5b9 [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 Geisslereff27472021-10-29 15:35:00 -050018 "
19
Patrick Williamse760df82023-05-26 11:10:49 -050020SRCREV = "5d9bf80c26b4b7dc9d8aa175d96d5a24e75b4d48"
Andrew Geissler028142b2023-05-05 11:29:21 -050021S = "${WORKDIR}/git"
Andrew Geisslereff27472021-10-29 15:35:00 -050022
23inherit pkgconfig autotools-brokensep systemd useradd
24
25SYSTEMD_SERVICE:${PN} = "dhcpcd.service"
26
27PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
28
29PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev"
30PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
31# ntp conflicts with chrony
32PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp"
33PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony"
34PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt"
35
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000036# add option to override DBDIR location
37DBDIR ?= "${localstatedir}/lib/${BPN}"
38
Andrew Geisslereff27472021-10-29 15:35:00 -050039EXTRA_OECONF = "--enable-ipv4 \
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000040 --dbdir=${DBDIR} \
Andrew Geisslereff27472021-10-29 15:35:00 -050041 --sbindir=${base_sbindir} \
42 --runstatedir=/run \
43 --enable-privsep \
44 --privsepuser=dhcpcd \
45 --with-hooks \
46 --with-eghooks \
47 "
48
49USERADD_PACKAGES = "${PN}"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000050USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd"
Andrew Geisslereff27472021-10-29 15:35:00 -050051
52do_install:append () {
53 # install systemd unit files
54 install -d ${D}${systemd_system_unitdir}
55 install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir}
56
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000057 chmod 700 ${D}${DBDIR}
58 chown dhcpcd:dhcpcd ${D}${DBDIR}
Andrew Geisslereff27472021-10-29 15:35:00 -050059}
60
61FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"