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.

81 lines
2.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:=shorewall-core
  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:=2
  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:=39996b9697a2017947049ad3f03cb278e8f939ff924b2bb4bf2a0bc17c59988e
  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/shorewall-core
  31. SECTION:=net
  32. CATEGORY:=Network
  33. TITLE:=Shorewall Core
  34. URL:=http://www.shorewall.net/
  35. SUBMENU:=Firewall
  36. endef
  37. define Package/shorewall-core/description
  38. The Shoreline Firewall, is high-level tool for configuring Netfilter.
  39. This package provides the core Shorewall libraries installed in /usr/share/shorewall/,
  40. which are required for the rest of the Shorewall packages to work.
  41. endef
  42. define Package/shorewall-core/conffiles
  43. /usr/share/shorewall/shorewallrc
  44. endef
  45. CONFIGURE_ARGS += \
  46. vendor=openwrt
  47. # MacOS bash is too old for shorewall-core, use OpenWrt host tools/bash built for macos hosts
  48. # use fakeuname to avoid 'if `uname` is Darwin' checks
  49. MACOS_ENV := \
  50. PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG) \
  51. $(BASH)
  52. CONFIGURE_VARS += \
  53. $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV))
  54. define Build/Compile
  55. DESTDIR=$(PKG_INSTALL_DIR) \
  56. $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV)) \
  57. $(PKG_BUILD_DIR)/install.sh
  58. endef
  59. define Package/shorewall-core/install
  60. $(INSTALL_DIR) $(1)/usr/share/shorewall/
  61. $(INSTALL_DIR) $(1)/usr/sbin/
  62. $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall $(1)/usr/share/
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall/wait4ifup $(1)/usr/share/shorewall/
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/shorewall $(1)/usr/sbin/
  65. endef
  66. $(eval $(call BuildPackage,shorewall-core))