Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1 | SECTION = "console/network" |
| 2 | SUMMARY = "dhcpcd - a DHCP client" |
| 3 | DESCRIPTION = "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 | |
| 7 | HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" |
| 8 | |
| 9 | LICENSE = "BSD-2-Clause" |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ba9c7e534853aaf3de76c905b2410ffd" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 11 | |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 12 | SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 13 | file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 14 | file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 15 | file://dhcpcd.service \ |
| 16 | file://dhcpcd@.service \ |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 17 | file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \ |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame^] | 18 | file://0001-privsep-fix-strlcpy-overflow-in-psp_ifname-239.patch \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 19 | " |
| 20 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame^] | 21 | SRCREV = "d2fbde99cf2d0072016af9dfe6a77032a5a9fc30" |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 22 | S = "${WORKDIR}/git" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 23 | |
| 24 | inherit pkgconfig autotools-brokensep systemd useradd |
| 25 | |
| 26 | SYSTEMD_SERVICE:${PN} = "dhcpcd.service" |
| 27 | |
| 28 | PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
| 29 | |
| 30 | PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev" |
| 31 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" |
| 32 | # ntp conflicts with chrony |
| 33 | PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp" |
| 34 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" |
| 35 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" |
| 36 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 37 | # add option to override DBDIR location |
| 38 | DBDIR ?= "${localstatedir}/lib/${BPN}" |
| 39 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 40 | EXTRA_OECONF = "--enable-ipv4 \ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 41 | --dbdir=${DBDIR} \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 42 | --sbindir=${base_sbindir} \ |
| 43 | --runstatedir=/run \ |
| 44 | --enable-privsep \ |
| 45 | --privsepuser=dhcpcd \ |
| 46 | --with-hooks \ |
| 47 | --with-eghooks \ |
| 48 | " |
| 49 | |
| 50 | USERADD_PACKAGES = "${PN}" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 51 | USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 52 | |
| 53 | do_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 Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 58 | chmod 700 ${D}${DBDIR} |
| 59 | chown dhcpcd:dhcpcd ${D}${DBDIR} |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" |