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 | |
| 11 | DEPENDS = "openssl libcap zlib" |
| 12 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 13 | SRC_URI = "https://ftp.isc.org/isc/dhcp/4.4.2-P1/dhcp-4.4.2-P1.tar.gz \ |
| 14 | https://ftp.isc.org/isc/bind9/9.11.32/bind-9.11.32.tar.gz;name=bind;downloadfilename=bind.tar.gz;unpack=0 \ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 15 | file://default-relay \ |
| 16 | file://init-relay \ |
| 17 | file://dhcrelay.service \ |
| 18 | file://0001-Makefile.am-only-build-dhcrelay.patch \ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 19 | file://0002-bind-version-update-to-latest-version.patch \ |
| 20 | file://0003-bind-Makefile.in-disable-backtrace.patch \ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 21 | " |
| 22 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 23 | SRC_URI[md5sum] = "3089a1ebd20a802ec0870ae337d43907" |
| 24 | SRC_URI[sha256sum] = "b05e04337539545a8faa0d6ac518defc61a07e5aec66a857f455e7f218c85a1a" |
| 25 | SRC_URI[bind.md5sum] = "0d029dd06ca60c6739c3189c999ef757" |
| 26 | SRC_URI[bind.sha256sum] = "cbf8cb4b74dd1452d97c3a2a8c625ea346df8516b4b3508ef07443121a591342" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 27 | |
| 28 | UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/" |
| 29 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/" |
| 30 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 31 | S = "${WORKDIR}/dhcp-4.4.2-P1" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 32 | |
| 33 | inherit autotools-brokensep systemd |
| 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | SYSTEMD_SERVICE:${PN} = "dhcrelay.service" |
| 36 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 37 | |
| 38 | CFLAGS += "-D_GNU_SOURCE -fcommon" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 39 | LDFLAGS:append = " -pthread" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 40 | |
| 41 | EXTRA_OECONF = "--enable-paranoia \ |
| 42 | --disable-static \ |
| 43 | --enable-libtool \ |
| 44 | --with-randomdev=/dev/random \ |
| 45 | " |
| 46 | EXTRA_OEMAKE += "LIBTOOL='${S}/${HOST_SYS}-libtool'" |
| 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 | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 51 | rm ${S}/bind/bind.tar.gz |
| 52 | mv ${WORKDIR}/bind.tar.gz ${S}/bind/ |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 53 | } |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | do_compile:prepend() { |
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 |
| 62 | install -m 0755 ${S}/${HOST_SYS}-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 () { |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 66 | install -d ${D}${sysconfdir}/default |
| 67 | install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay |
| 68 | |
| 69 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 70 | install -d ${D}${systemd_unitdir}/system |
| 71 | install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system |
| 72 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 73 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service |
| 74 | else |
| 75 | install -d ${D}${sysconfdir}/init.d |
| 76 | install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay |
| 77 | fi |
| 78 | } |
| 79 | |
| 80 | PARALLEL_MAKE = "" |