William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [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 = "ISC" |
| 9 | LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=004a4db50a1e20972e924a8618747c01" |
| 10 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 11 | DEPENDS = "openssl libcap zlib chrpath-replacement-native" |
| 12 | EXTRANATIVEPATH += "chrpath-native" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 13 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 14 | SRC_URI = "https://ftp.isc.org/isc/dhcp/4.4.2-P1/dhcp-4.4.2-P1.tar.gz \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 15 | https://ftp.isc.org/isc/bind9/9.11.32/bind-9.11.32.tar.gz;name=bind;unpack=0 \ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 16 | file://default-relay \ |
| 17 | file://init-relay \ |
| 18 | file://dhcrelay.service \ |
| 19 | file://0001-Makefile.am-only-build-dhcrelay.patch \ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 20 | file://0002-bind-version-update-to-latest-version.patch \ |
| 21 | file://0003-bind-Makefile.in-disable-backtrace.patch \ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 22 | " |
| 23 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 24 | SRC_URI[md5sum] = "3089a1ebd20a802ec0870ae337d43907" |
| 25 | SRC_URI[sha256sum] = "b05e04337539545a8faa0d6ac518defc61a07e5aec66a857f455e7f218c85a1a" |
| 26 | SRC_URI[bind.md5sum] = "0d029dd06ca60c6739c3189c999ef757" |
| 27 | SRC_URI[bind.sha256sum] = "cbf8cb4b74dd1452d97c3a2a8c625ea346df8516b4b3508ef07443121a591342" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 28 | |
| 29 | UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/" |
| 30 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/" |
| 31 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 32 | S = "${WORKDIR}/dhcp-4.4.2-P1" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 33 | |
| 34 | inherit autotools-brokensep systemd |
| 35 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 36 | SYSTEMD_SERVICE:${PN} = "dhcrelay.service" |
| 37 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 38 | |
| 39 | CFLAGS += "-D_GNU_SOURCE -fcommon" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | LDFLAGS:append = " -pthread" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 41 | |
| 42 | EXTRA_OECONF = "--enable-paranoia \ |
| 43 | --disable-static \ |
| 44 | --enable-libtool \ |
| 45 | --with-randomdev=/dev/random \ |
| 46 | " |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 47 | |
| 48 | # Enable shared libs per dhcp README |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | do_configure:prepend () { |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 50 | cp configure.ac+lt configure.ac |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 51 | cp ${WORKDIR}/bind-9.11.32.tar.gz ${S}/bind/bind.tar.gz |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 52 | } |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 53 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 54 | do_compile:prepend() { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 55 | # Need to unpack this now instead of earlier as do_configure will delete the configure script |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 56 | rm -rf ${S}/bind/bind-9.11.32/ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 57 | tar xf ${S}/bind/bind.tar.gz -C ${S}/bind |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 58 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/bind/bind-9.11.32/ |
| 59 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/bind/bind-9.11.32/ |
| 60 | cp -fpR ${S}/m4/*.m4 ${S}/bind/bind-9.11.32/libtool.m4/ |
| 61 | rm -rf ${S}/bind/bind-9.11.32/libtool |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 62 | install -m 0755 ${S}/libtool ${S}/bind/bind-9.11.32/ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 63 | } |
| 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | do_install:append () { |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame^] | 66 | install -Dm 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay |
| 67 | install -Dm 0755 ${B}/bind/bind-9.11.32/lib/isccfg/.libs/libisccfg.so.163 ${D}${libdir}/libisccfg.so.163 |
| 68 | install -Dm 0755 ${B}/bind/bind-9.11.32/lib/dns/.libs/libdns.so.1115 ${D}${libdir}/libdns.so.1115 |
| 69 | chrpath --delete ${D}${libdir}/libisccfg.so.163 |
| 70 | chrpath --delete ${D}${libdir}/libdns.so.1115 |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 71 | |
| 72 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 73 | install -d ${D}${systemd_unitdir}/system |
| 74 | install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system |
| 75 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 76 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 77 | else |
| 78 | install -d ${D}${sysconfdir}/init.d |
| 79 | install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay |
| 80 | fi |
| 81 | } |
| 82 | |
| 83 | PARALLEL_MAKE = "" |