ufw_0.36.1.bb 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. SUMMARY = "Uncomplicated Firewall"
  2. DESCRIPTION = "UFW stands for Uncomplicated Firewall, and is program for \
  3. managing a netfilter firewall. It provides a command line interface and aims \
  4. to be uncomplicated and easy to use."
  5. HOMEPAGE = "https://launchpad.net/ufw"
  6. SECTION = "net"
  7. LICENSE = "GPL-3.0-only"
  8. LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
  9. SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \
  10. file://0001-optimize-boot.patch \
  11. file://0002-add-an-option-to-specify-iptables-location.patch \
  12. file://0003-only-make-one-reference-to-env.patch \
  13. file://setuptools.patch \
  14. "
  15. SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c"
  16. UPSTREAM_CHECK_URI = "https://launchpad.net/ufw"
  17. inherit setuptools3_legacy features_check systemd update-rc.d
  18. RDEPENDS:${PN} = " \
  19. iptables \
  20. python3 \
  21. python3-modules \
  22. "
  23. RRECOMMENDS:${PN} = " \
  24. kernel-module-ipv6 \
  25. kernel-module-nf-conntrack-ipv6 \
  26. kernel-module-nf-log-common \
  27. kernel-module-nf-log-ipv4 \
  28. kernel-module-nf-log-ipv6 \
  29. kernel-module-nf-addrtype \
  30. kernel-module-nf-limit \
  31. kernel-module-nf-log \
  32. kernel-module-nf-recent \
  33. "
  34. do_configure:prepend() {
  35. if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
  36. sed -i -e 's|/lib|${nonarch_base_libdir}|' ${S}/setup.py
  37. fi
  38. }
  39. do_install:append() {
  40. install -d ${D}${systemd_unitdir}/system/
  41. install -m 0644 ${S}/doc/systemd.example ${D}${systemd_unitdir}/system/ufw.service
  42. install -d ${D}${sysconfdir}/init.d/
  43. install -m 0755 ${S}/doc/initscript.example ${D}${sysconfdir}/init.d/ufw
  44. }
  45. SYSTEMD_SERVICE:${PN} = "ufw.service"
  46. INITSCRIPT_NAME = "ufw"
  47. INITSCRIPT_PARAMS = "defaults"
  48. # Certain items are explicitly put under /lib, not base_libdir when installed.
  49. #
  50. FILES:${PN} += " \
  51. ${sbindir}/* \
  52. ${datadir}/ufw/* \
  53. ${nonarch_base_libdir}/ufw/* \
  54. ${sysconfdir}/ufw/* \
  55. ${sysconfdir}/default/ufw \
  56. "
  57. REQUIRED_DISTRO_FEATURES = "ipv6"
  58. SETUPTOOLS_BUILD_ARGS:append = " --iptables-dir /usr/sbin"
  59. SETUPTOOLS_INSTALL_ARGS:append = " --iptables-dir /usr/sbin"