blob: 40188cea21ce740aa51c55d58ea498e2ff57c1e3 [file] [log] [blame]
Andrew Geisslerf103a7f2021-05-07 16:09:40 -05001
Patrick Williamsb48b7b42016-08-17 15:04:38 -05002SUMMARY = "Uncomplicated Firewall"
3DESCRIPTION = "UFW stands for Uncomplicated Firewall, and is program for \
4managing a netfilter firewall. It provides a command line interface and aims \
5to be uncomplicated and easy to use."
6HOMEPAGE = "https://launchpad.net/ufw"
7SECTION = "net"
8LICENSE = "GPLv3"
9LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
10
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050011SRC_URI = "https://launchpad.net/ufw/0.36/0.36/+download/ufw-0.36.tar.gz \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050012 file://0001-optimize-boot.patch \
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050013 file://0002-add-an-option-to-specify-iptables-location.patch \
14 file://0003-only-make-one-reference-to-env.patch \
15 "
Andrew Geissler82c905d2020-04-13 13:39:40 -050016
17UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"
18
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050019SRC_URI[md5sum] = "6d8ab1506da21ae003f4628f93d05781"
20SRC_URI[sha256sum] = "754b22ae5edff0273460ac9f57509c3938187e0cf4fb9692c6a02833fff33cfc"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050021
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050022inherit setuptools3 features_check systemd update-rc.d
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023
Patrick Williams213cb262021-08-07 19:21:33 -050024RDEPENDS:${PN} = " \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050025 iptables \
Andrew Geissler82c905d2020-04-13 13:39:40 -050026 python3 \
27 python3-modules \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050028 "
29
Patrick Williams213cb262021-08-07 19:21:33 -050030RRECOMMENDS:${PN} = " \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050031 kernel-module-ipv6 \
32 kernel-module-nf-conntrack-ipv6 \
33 kernel-module-nf-log-common \
34 kernel-module-nf-log-ipv4 \
35 kernel-module-nf-log-ipv6 \
36 kernel-module-nf-addrtype \
37 kernel-module-nf-limit \
38 kernel-module-nf-log \
39 kernel-module-nf-recent \
40"
41
Patrick Williams213cb262021-08-07 19:21:33 -050042do_install:append() {
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050043 install -d ${D}${systemd_unitdir}/system/
44 install -m 0644 ${S}/doc/systemd.example ${D}${systemd_unitdir}/system/ufw.service
45
46 install -d ${D}${sysconfdir}/init.d/
47 install -m 0755 ${S}/doc/initscript.example ${D}${sysconfdir}/init.d/ufw
48}
49
Patrick Williams213cb262021-08-07 19:21:33 -050050SYSTEMD_SERVICE:${PN} = "ufw.service"
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050051
52INITSCRIPT_NAME = "ufw"
53INITSCRIPT_PARAMS = "defaults"
54
Patrick Williamsb48b7b42016-08-17 15:04:38 -050055# Certain items are explicitly put under /lib, not base_libdir when installed.
56#
Patrick Williams213cb262021-08-07 19:21:33 -050057FILES:${PN} += " \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050058 ${sbindir}/* \
59 ${datadir}/ufw/* \
60 /lib/ufw/* \
61 ${sysconfdir}/ufw/* \
62 ${sysconfdir}/default/ufw \
63"
64
65REQUIRED_DISTRO_FEATURES = "ipv6"
66
Patrick Williams213cb262021-08-07 19:21:33 -050067DISTUTILS_BUILD_ARGS:append = " --iptables-dir /usr/sbin"
68DISTUTILS_INSTALL_ARGS:append = " --iptables-dir /usr/sbin"