blob: bc33c18c0b674b90e06495f847d5f5a9c447970e [file] [log] [blame]
Andrew Geissler72956ed2021-01-08 16:11:14 -06001SUMMARY = "Filtering tool for a Linux-based bridging firewall"
2HOMEPAGE = "http://sourceforge.net/projects/ebtables/"
3DESCRIPTION = "Utility for basic Ethernet frame filtering on a Linux bridge, \
4 advanced logging, MAC DNAT/SNAT and brouting."
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=53b4a999993871a28ab1488fdbd2e73e"
7SECTION = "net"
8
9RDEPENDS_${PN} += "bash perl"
10
11RRECOMMENDS_${PN} += "kernel-module-ebtables \
12 "
13
14SRC_URI = "http://ftp.netfilter.org/pub/ebtables/ebtables-${PV}.tar.gz \
15 file://0001-Makefile.am-do-not-install-etc-ethertypes.patch \
16 file://ebtables-legacy-save \
17 file://ebtables.common \
18 file://ebtables.service \
19 "
20
21SRC_URI_append_libc-musl = " file://0010-Adjust-header-include-sequence.patch"
22
23SRC_URI[md5sum] = "071c8b0a59241667a0044fb040d4fc72"
24SRC_URI[sha256sum] = "b71f654784a726329f88b412ef7b96b4e5d786ed2bd28193ed7b4c0d677dfd2a"
25
26inherit systemd autotools
27
28do_install_append () {
29 # Replace upstream ebtables-save perl script with Fedora bash based rewrite
30 # http://pkgs.fedoraproject.org/cgit/rpms/ebtables.git/tree/ebtables-save
31 rm -f ${D}${sbindir}/ebtables-legacy-save
32 install -m 0755 ${WORKDIR}/ebtables-legacy-save ${D}${sbindir}/ebtables-legacy-save
33
34 # Install systemd service files
35 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
36 install -d ${D}${systemd_unitdir}/system
37 install -m 0644 ${WORKDIR}/ebtables.service ${D}${systemd_unitdir}/system
38 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/ebtables.service
39 install -m 0755 ${WORKDIR}/ebtables.common ${D}${sbindir}/ebtables.common
40 fi
41
42 install -d ${D}${base_sbindir}
43 ln -sf ${sbindir}/ebtables-legacy ${D}${base_sbindir}/ebtables
44}
45
46do_configure_prepend () {
47 ( cd ${S}; ./autogen.sh )
48}
49
50FILES_${PN}-dbg += "${base_libdir}/ebtables/.debug"
51FILES_${PN} += "${base_libdir}/ebtables/*.so"
52
53SYSTEMD_SERVICE_${PN} = "ebtables.service"