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" |
| 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d148485768fe85b9f1072b186a7e9b4d" |
| 11 | |
| 12 | UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/" |
| 13 | |
| 14 | SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \ |
| 15 | file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 16 | file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \ |
| 17 | file://0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch \ |
| 18 | file://0002-privsep-Allow-newfstatat-syscall-as-well.patch \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 19 | file://dhcpcd.service \ |
| 20 | file://dhcpcd@.service \ |
| 21 | " |
| 22 | |
| 23 | SRC_URI[sha256sum] = "819357634efed1ea5cf44ec01b24d3d3f8852fec8b4249925dcc5667c54e376c" |
| 24 | |
| 25 | inherit pkgconfig autotools-brokensep systemd useradd |
| 26 | |
| 27 | SYSTEMD_SERVICE:${PN} = "dhcpcd.service" |
| 28 | |
| 29 | PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
| 30 | |
| 31 | PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev" |
| 32 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" |
| 33 | # ntp conflicts with chrony |
| 34 | PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp" |
| 35 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" |
| 36 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" |
| 37 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 38 | # add option to override DBDIR location |
| 39 | DBDIR ?= "${localstatedir}/lib/${BPN}" |
| 40 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 41 | EXTRA_OECONF = "--enable-ipv4 \ |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 42 | --dbdir=${DBDIR} \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 43 | --sbindir=${base_sbindir} \ |
| 44 | --runstatedir=/run \ |
| 45 | --enable-privsep \ |
| 46 | --privsepuser=dhcpcd \ |
| 47 | --with-hooks \ |
| 48 | --with-eghooks \ |
| 49 | " |
| 50 | |
| 51 | USERADD_PACKAGES = "${PN}" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 52 | USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 53 | |
| 54 | do_install:append () { |
| 55 | # install systemd unit files |
| 56 | install -d ${D}${systemd_system_unitdir} |
| 57 | install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} |
| 58 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 59 | chmod 700 ${D}${DBDIR} |
| 60 | chown dhcpcd:dhcpcd ${D}${DBDIR} |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" |