Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SECTION = "console/network" |
| 2 | SUMMARY = "Internet Software Consortium DHCP Relay Agent" |
| 3 | DESCRIPTION = "A DHCP relay agent passes DHCP requests from one \ |
| 4 | LAN to another, so that a DHCP server is not needed on every LAN." |
| 5 | |
| 6 | HOMEPAGE = "http://www.isc.org/" |
| 7 | |
| 8 | LICENSE = "MPL-2.0" |
| 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c463f4afde26d9eb60f14f50aeb85f8f" |
| 10 | |
| 11 | DEPENDS = "openssl libcap zlib" |
| 12 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 13 | SRC_URI = "https://downloads.isc.org/isc/dhcp/4.4.3-P1/dhcp-4.4.3-P1.tar.gz \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 14 | file://default-relay \ |
| 15 | file://init-relay \ |
| 16 | file://dhcrelay.service \ |
| 17 | file://0001-Makefile.am-only-build-dhcrelay.patch \ |
| 18 | file://0002-bind-Makefile.in-disable-backtrace.patch \ |
| 19 | file://0003-bind-Makefile.in-regenerate-configure.patch \ |
| 20 | " |
| 21 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 22 | SRC_URI[sha256sum] = "0ac416bb55997ca8632174fd10737fd61cdb8dba2752160a335775bc21dc73c7" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 23 | |
| 24 | UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/" |
| 25 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/" |
| 26 | |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 27 | S = "${WORKDIR}/dhcp-4.4.3-P1" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 28 | |
| 29 | inherit autotools-brokensep systemd pkgconfig |
| 30 | |
| 31 | SYSTEMD_SERVICE:${PN} = "dhcrelay.service" |
| 32 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" |
| 33 | |
| 34 | CFLAGS += "-D_GNU_SOURCE -fcommon" |
| 35 | LDFLAGS:append = " -pthread" |
| 36 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 37 | BIND_EXTRA_CONFIG = "\ |
| 38 | --build=${BUILD_SYS} \ |
| 39 | --host=${HOST_SYS} \ |
| 40 | --target=${TARGET_SYS} \ |
| 41 | " |
| 42 | |
| 43 | EXTRA_OECONF = "--with-bind-extra-config="${BIND_EXTRA_CONFIG}" \ |
| 44 | --enable-paranoia \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 45 | --disable-static \ |
| 46 | --enable-libtool \ |
| 47 | --with-randomdev=/dev/random \ |
| 48 | " |
| 49 | |
| 50 | # Enable shared libs per dhcp README |
| 51 | do_configure:prepend () { |
| 52 | cp configure.ac+lt configure.ac |
| 53 | } |
| 54 | |
| 55 | do_install:append () { |
| 56 | install -Dm 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay |
| 57 | |
| 58 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 59 | install -d ${D}${systemd_unitdir}/system |
| 60 | install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system |
| 61 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 62 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 63 | else |
| 64 | install -d ${D}${sysconfdir}/init.d |
| 65 | install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay |
| 66 | fi |
| 67 | } |
| 68 | |
| 69 | PARALLEL_MAKE = "" |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 70 | |
| 71 | # dhcp-relay contains a bundled "bind", thus their dev packages conflict each other |
| 72 | RCONFLICTS:${PN}-dev = "bind-dev" |