blob: 21e5c1877ef5912b4c085c1a08a40a7f7215e812 [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
Patrick Williams213cb262021-08-07 19:21:33 -05009RDEPENDS:${PN} += "bash perl"
Andrew Geissler72956ed2021-01-08 16:11:14 -060010
Patrick Williams213cb262021-08-07 19:21:33 -050011RRECOMMENDS:${PN} += "kernel-module-ebtables \
Andrew Geissler72956ed2021-01-08 16:11:14 -060012 "
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
Patrick Williams213cb262021-08-07 19:21:33 -050021SRC_URI:append:libc-musl = " file://0010-Adjust-header-include-sequence.patch"
Andrew Geissler72956ed2021-01-08 16:11:14 -060022
23SRC_URI[md5sum] = "071c8b0a59241667a0044fb040d4fc72"
24SRC_URI[sha256sum] = "b71f654784a726329f88b412ef7b96b4e5d786ed2bd28193ed7b4c0d677dfd2a"
25
26inherit systemd autotools
27
Patrick Williams213cb262021-08-07 19:21:33 -050028do_install:append () {
Andrew Geissler72956ed2021-01-08 16:11:14 -060029 # 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
Patrick Williams213cb262021-08-07 19:21:33 -050046do_configure:prepend () {
Andrew Geissler72956ed2021-01-08 16:11:14 -060047 ( cd ${S}; ./autogen.sh )
48}
49
Patrick Williams213cb262021-08-07 19:21:33 -050050FILES:${PN}-dbg += "${base_libdir}/ebtables/.debug"
51FILES:${PN} += "${base_libdir}/ebtables/*.so"
Andrew Geissler72956ed2021-01-08 16:11:14 -060052
Patrick Williams213cb262021-08-07 19:21:33 -050053SYSTEMD_SERVICE:${PN} = "ebtables.service"