blob: 70216a85e3b1f4a25d756b9b853532fc22be4c55 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001
2SUMMARY = "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 = "GPL-3.0-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
10
11SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \
12 file://0001-optimize-boot.patch \
13 file://0002-add-an-option-to-specify-iptables-location.patch \
14 file://0003-only-make-one-reference-to-env.patch \
15 file://setuptools.patch \
16 "
17SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c"
18
19UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"
20
21inherit setuptools3_legacy features_check systemd update-rc.d
22
23RDEPENDS:${PN} = " \
24 iptables \
25 python3 \
26 python3-modules \
27 "
28
29RRECOMMENDS:${PN} = " \
30 kernel-module-ipv6 \
31 kernel-module-nf-conntrack-ipv6 \
32 kernel-module-nf-log-common \
33 kernel-module-nf-log-ipv4 \
34 kernel-module-nf-log-ipv6 \
35 kernel-module-nf-addrtype \
36 kernel-module-nf-limit \
37 kernel-module-nf-log \
38 kernel-module-nf-recent \
39"
40
41do_install:append() {
42 install -d ${D}${systemd_unitdir}/system/
43 install -m 0644 ${S}/doc/systemd.example ${D}${systemd_unitdir}/system/ufw.service
44
45 install -d ${D}${sysconfdir}/init.d/
46 install -m 0755 ${S}/doc/initscript.example ${D}${sysconfdir}/init.d/ufw
47}
48
49SYSTEMD_SERVICE:${PN} = "ufw.service"
50
51INITSCRIPT_NAME = "ufw"
52INITSCRIPT_PARAMS = "defaults"
53
54# Certain items are explicitly put under /lib, not base_libdir when installed.
55#
56FILES:${PN} += " \
57 ${sbindir}/* \
58 ${datadir}/ufw/* \
59 /lib/ufw/* \
60 ${sysconfdir}/ufw/* \
61 ${sysconfdir}/default/ufw \
62"
63
64REQUIRED_DISTRO_FEATURES = "ipv6"
65
66DISTUTILS_BUILD_ARGS:append = " --iptables-dir /usr/sbin"
67DISTUTILS_INSTALL_ARGS:append = " --iptables-dir /usr/sbin"