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 | |
| 37 | EXTRA_OECONF = "--enable-paranoia \ |
| 38 | --disable-static \ |
| 39 | --enable-libtool \ |
| 40 | --with-randomdev=/dev/random \ |
| 41 | " |
| 42 | |
| 43 | # Enable shared libs per dhcp README |
| 44 | do_configure:prepend () { |
| 45 | cp configure.ac+lt configure.ac |
| 46 | } |
| 47 | |
| 48 | do_install:append () { |
| 49 | install -Dm 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay |
| 50 | |
| 51 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 52 | install -d ${D}${systemd_unitdir}/system |
| 53 | install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system |
| 54 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 55 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 56 | else |
| 57 | install -d ${D}${sysconfdir}/init.d |
| 58 | install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay |
| 59 | fi |
| 60 | } |
| 61 | |
| 62 | PARALLEL_MAKE = "" |