blob: e5f7e0334f648d056aa7eb2504bfff93fda73448 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001SECTION = "console/network"
2SUMMARY = "Internet Software Consortium DHCP Relay Agent"
3DESCRIPTION = "A DHCP relay agent passes DHCP requests from one \
4LAN to another, so that a DHCP server is not needed on every LAN."
5
6HOMEPAGE = "http://www.isc.org/"
7
8LICENSE = "MPL-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=c463f4afde26d9eb60f14f50aeb85f8f"
10
11DEPENDS = "openssl libcap zlib"
12
Patrick Williams2194f502022-10-16 14:26:09 -050013SRC_URI = "https://downloads.isc.org/isc/dhcp/4.4.3-P1/dhcp-4.4.3-P1.tar.gz \
Andrew Geissler9aee5002022-03-30 16:27:02 +000014 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 Williams2194f502022-10-16 14:26:09 -050022SRC_URI[sha256sum] = "0ac416bb55997ca8632174fd10737fd61cdb8dba2752160a335775bc21dc73c7"
Andrew Geissler9aee5002022-03-30 16:27:02 +000023
24UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/"
25UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/"
26
Patrick Williams2194f502022-10-16 14:26:09 -050027S = "${WORKDIR}/dhcp-4.4.3-P1"
Andrew Geissler9aee5002022-03-30 16:27:02 +000028
29inherit autotools-brokensep systemd pkgconfig
30
31SYSTEMD_SERVICE:${PN} = "dhcrelay.service"
32SYSTEMD_AUTO_ENABLE:${PN} = "disable"
33
34CFLAGS += "-D_GNU_SOURCE -fcommon"
35LDFLAGS:append = " -pthread"
36
Andrew Geissler8f840682023-07-21 09:09:43 -050037BIND_EXTRA_CONFIG = "\
38 --build=${BUILD_SYS} \
39 --host=${HOST_SYS} \
40 --target=${TARGET_SYS} \
41"
42
43EXTRA_OECONF = "--with-bind-extra-config="${BIND_EXTRA_CONFIG}" \
44 --enable-paranoia \
Andrew Geissler9aee5002022-03-30 16:27:02 +000045 --disable-static \
46 --enable-libtool \
47 --with-randomdev=/dev/random \
48 "
49
50# Enable shared libs per dhcp README
51do_configure:prepend () {
52 cp configure.ac+lt configure.ac
53}
54
55do_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
69PARALLEL_MAKE = ""
Patrick Williamse760df82023-05-26 11:10:49 -050070
71# dhcp-relay contains a bundled "bind", thus their dev packages conflict each other
72RCONFLICTS:${PN}-dev = "bind-dev"