1
0

Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. PKG_CPE_ID:=cpe:/a:netfilter:ebtables
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/ebtables-legacy
  19. SECTION:=net
  20. CATEGORY:=Network
  21. SUBMENU:=Firewall
  22. DEPENDS:=+kmod-ebtables
  23. TITLE:=Ethernet bridge firewall administration utility
  24. URL:=http://ebtables.sourceforge.net/
  25. PROVIDES:=ebtables
  26. ALTERNATIVES:=\
  27. 200:/usr/sbin/ebtables:/usr/sbin/ebtables-legacy
  28. endef
  29. define Package/ebtables-legacy-utils
  30. $(call Package/ebtables-legacy)
  31. DEPENDS:=ebtables-legacy
  32. TITLE:=ebtables save/restore utilities
  33. PROVIDES:=ebtables-utils
  34. ALTERNATIVES:=\
  35. 200:/usr/sbin/ebtables-restore:/usr/sbin/ebtables-legacy-restore
  36. endef
  37. define Package/ebtables-legacy/description
  38. The ebtables program is a filtering tool for a bridging firewall. The
  39. filtering is focussed on the Link Layer Ethernet frame fields. Apart
  40. from filtering, it also gives the ability to alter the Ethernet MAC
  41. addresses and implement a brouter.
  42. endef
  43. define Package/ebtables-legacy-utils/description
  44. $(call Package/ebtables-legacy/description)
  45. endef
  46. MAKE_VARS += EXT_LIBSI="$(LIBGCC_S)"
  47. MAKE_FLAGS += \
  48. CFLAGS="$(TARGET_CFLAGS)" \
  49. LIBDIR="/usr/lib/ebtables"
  50. define Package/ebtables-legacy/install
  51. $(INSTALL_DIR) $(1)/etc
  52. $(INSTALL_DATA) $(PKG_BUILD_DIR)/ethertypes $(1)/etc/
  53. $(INSTALL_DIR) $(1)/usr/lib/ebtables
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib*.so $(1)/usr/lib/
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/extensions/*.so $(1)/usr/lib/ebtables/
  56. $(INSTALL_DIR) $(1)/usr/sbin
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ebtables-legacy
  58. endef
  59. define Package/ebtables-legacy-utils/install
  60. $(INSTALL_DIR) $(1)/usr/sbin
  61. #ebtables-save depends on perl and is just broken
  62. #$(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-save $(1)/usr/sbin/ebtables-legacy-save
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-restore $(1)/usr/sbin/ebtables-legacy-restore
  64. endef
  65. $(eval $(call BuildPackage,ebtables-legacy))
  66. $(eval $(call BuildPackage,ebtables-legacy-utils))