Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=ebtables
  9. PKG_SOURCE_DATE:=2018-06-27
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=https://git.netfilter.org/ebtables
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_VERSION:=48cff25dfea5b37e16ba5dc6601e98ab140f5f99
  14. PKG_MIRROR_HASH:=1327cdc3402e5e3056819e4e9b6f9d4a5bfd401f2c4f58447afb2c3c73fc8aac
  15. PKG_LICENSE:=GPL-2.0
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/ebtables-legacy
  18. SECTION:=net
  19. CATEGORY:=Network
  20. SUBMENU:=Firewall
  21. DEPENDS:=+kmod-ebtables
  22. TITLE:=Ethernet bridge firewall administration utility
  23. URL:=http://ebtables.sourceforge.net/
  24. PROVIDES:=ebtables
  25. ALTERNATIVES:=\
  26. 200:/usr/sbin/ebtables:/usr/sbin/ebtables-legacy
  27. endef
  28. define Package/ebtables-legacy-utils
  29. $(call Package/ebtables-legacy)
  30. DEPENDS:=ebtables-legacy
  31. TITLE:=ebtables save/restore utilities
  32. PROVIDES:=ebtables-utils
  33. ALTERNATIVES:=\
  34. 200:/usr/sbin/ebtables-restore:/usr/sbin/ebtables-legacy-restore
  35. endef
  36. define Package/ebtables-legacy/description
  37. The ebtables program is a filtering tool for a bridging firewall. The
  38. filtering is focussed on the Link Layer Ethernet frame fields. Apart
  39. from filtering, it also gives the ability to alter the Ethernet MAC
  40. addresses and implement a brouter.
  41. endef
  42. define Package/ebtables-legacy-utils/description
  43. $(call Package/ebtables-legacy/description)
  44. endef
  45. MAKE_VARS += EXT_LIBSI="$(LIBGCC_S)"
  46. MAKE_FLAGS += \
  47. CFLAGS="$(TARGET_CFLAGS)" \
  48. LIBDIR="/usr/lib/ebtables"
  49. define Package/ebtables-legacy/install
  50. $(INSTALL_DIR) $(1)/etc
  51. $(INSTALL_DATA) $(PKG_BUILD_DIR)/ethertypes $(1)/etc/
  52. $(INSTALL_DIR) $(1)/usr/lib/ebtables
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib*.so $(1)/usr/lib/
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/extensions/*.so $(1)/usr/lib/ebtables/
  55. $(INSTALL_DIR) $(1)/usr/sbin
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ebtables-legacy
  57. endef
  58. define Package/ebtables-legacy-utils/install
  59. $(INSTALL_DIR) $(1)/usr/sbin
  60. #ebtables-save depends on perl and is just broken
  61. #$(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-save $(1)/usr/sbin/ebtables-legacy-save
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-restore $(1)/usr/sbin/ebtables-legacy-restore
  63. endef
  64. $(eval $(call BuildPackage,ebtables-legacy))
  65. $(eval $(call BuildPackage,ebtables-legacy-utils))