You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.6 KiB

  1. #
  2. # Copyright (C) 2008-2012 OpenWrt.org
  3. # Copyright (C) 2017 Willem van den Akker <wvdakker@wilsoft.nl>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=shorewall6-lite
  10. PKG_MAJOR_MINOR_VERSION:=5.2
  11. PKG_BUGFIX_MAJOR_VERSION:=8
  12. PKG_BUGFIX_MINOR_VERSION:=
  13. PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
  14. PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
  15. PKG_RELEASE:=3
  16. PKG_SOURCE_URL:=http://shorewall.org/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
  17. http://slovakia.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
  18. http://www.shorewall.no/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
  19. http://france.shorewall.net/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
  20. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  21. PKG_HASH:=086764bb976d199b45563e39b1ab9a131ccb521d60d186f606dd8bbcee7fcada
  22. PKG_BUILD_DEPENDS:=HOST_OS_MACOS:fakeuname/host
  23. PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
  24. PKG_LICENSE:=GPL-2.0-or-later
  25. PKG_LICENSE_FILES:=COPYING
  26. include $(INCLUDE_DIR)/package.mk
  27. ifeq ($(CONFIG_HOST_OS_MACOS),y)
  28. include ../../utils/fakeuname/fakeuname.mk
  29. endif
  30. define Package/shorewall6-lite
  31. SECTION:=net
  32. CATEGORY:=Network
  33. DEPENDS:=+ip @IPV6 +ip6tables +shorewall-core
  34. TITLE:=Shorewall6 Lite
  35. URL:=http://www.shorewall.net/
  36. SUBMENU:=Firewall
  37. endef
  38. define Package/shorewall6-lite/description
  39. The Shoreline Firewall, is high-level tool for configuring Netfilter.
  40. Shorewall6 allows for central administration of multiple IPv6 firewalls
  41. through use of Shorewall6 lite. The full Shorewall6 product is installed
  42. on a central administrative system where compiled Shorewall6 scripts are
  43. generated. These scripts are copied to the firewall systems where they
  44. run under the control of Shorewall6-lite.
  45. Note: This is the IPv6 implementation of Shorewall.
  46. endef
  47. define Package/shorewall6-lite/conffiles
  48. /etc/shorewall6-lite/
  49. endef
  50. CONFIGURE_ARGS += \
  51. vendor=openwrt
  52. # MacOS bash is too old for shorewall6-lite, use OpenWrt host tools/bash built for macos hosts
  53. # use fakeuname to avoid 'if `uname` is Darwin' checks
  54. MACOS_ENV := \
  55. PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG) \
  56. $(BASH)
  57. CONFIGURE_VARS += \
  58. $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV))
  59. # install.sh explicitly defines PATH= so fakeuname doesn't work. Remove PATH= on macos
  60. define Build/Prepare
  61. $(call Build/Prepare/Default)
  62. ifeq ($(CONFIG_HOST_OS_MACOS),y)
  63. $(SED) '/^PATH=/d' $(PKG_BUILD_DIR)/install.sh
  64. endif
  65. endef
  66. define Build/Compile
  67. DESTDIR=$(PKG_INSTALL_DIR) \
  68. $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV)) \
  69. $(PKG_BUILD_DIR)/install.sh
  70. endef
  71. define Package/shorewall6-lite/install
  72. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface/
  73. $(INSTALL_DIR) $(1)/etc/init.d/
  74. $(INSTALL_DIR) $(1)/etc/shorewall6-lite/state/
  75. $(INSTALL_DIR) $(1)/usr/sbin/
  76. $(INSTALL_DIR) $(1)/usr/share/shorewall6-lite/
  77. $(CP) $(PKG_INSTALL_DIR)/etc/shorewall6-lite/ $(1)/etc/
  78. $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall6-lite/ $(1)/usr/share/
  79. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shorewall6-lite $(1)/usr/sbin/
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall6-lite/shorecap $(1)/usr/share/shorewall6-lite/
  81. $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall6-lite/
  82. $(INSTALL_BIN) ./files/hotplug_iface $(1)/etc/hotplug.d/iface/05-shorewall6-lite
  83. $(INSTALL_BIN) ./files/shorewall6-lite.init $(1)/etc/init.d/shorewall6-lite
  84. $(INSTALL_BIN) ./files/vardir $(1)/etc/shorewall6-lite/
  85. endef
  86. $(eval $(call BuildPackage,shorewall6-lite))