Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 1 | |
| 2 | SUMMARY = "Uncomplicated Firewall" |
| 3 | DESCRIPTION = "UFW stands for Uncomplicated Firewall, and is program for \ |
| 4 | managing a netfilter firewall. It provides a command line interface and aims \ |
| 5 | to be uncomplicated and easy to use." |
| 6 | HOMEPAGE = "https://launchpad.net/ufw" |
| 7 | SECTION = "net" |
| 8 | LICENSE = "GPL-3.0-only" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" |
| 10 | |
| 11 | SRC_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 | " |
| 17 | SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c" |
| 18 | |
| 19 | UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" |
| 20 | |
| 21 | inherit setuptools3_legacy features_check systemd update-rc.d |
| 22 | |
| 23 | RDEPENDS:${PN} = " \ |
| 24 | iptables \ |
| 25 | python3 \ |
| 26 | python3-modules \ |
| 27 | " |
| 28 | |
| 29 | RRECOMMENDS:${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 | |
| 41 | do_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 | |
| 49 | SYSTEMD_SERVICE:${PN} = "ufw.service" |
| 50 | |
| 51 | INITSCRIPT_NAME = "ufw" |
| 52 | INITSCRIPT_PARAMS = "defaults" |
| 53 | |
| 54 | # Certain items are explicitly put under /lib, not base_libdir when installed. |
| 55 | # |
| 56 | FILES:${PN} += " \ |
| 57 | ${sbindir}/* \ |
| 58 | ${datadir}/ufw/* \ |
| 59 | /lib/ufw/* \ |
| 60 | ${sysconfdir}/ufw/* \ |
| 61 | ${sysconfdir}/default/ufw \ |
| 62 | " |
| 63 | |
| 64 | REQUIRED_DISTRO_FEATURES = "ipv6" |
| 65 | |
| 66 | DISTUTILS_BUILD_ARGS:append = " --iptables-dir /usr/sbin" |
| 67 | DISTUTILS_INSTALL_ARGS:append = " --iptables-dir /usr/sbin" |