Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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_VERSION:=2.0.10-4
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/ebtables
  13. PKG_MD5SUM:=506742a3d44b9925955425a659c1a8d0
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/ebtables-v$(PKG_VERSION)
  15. PKG_LICENSE:=GPL-2.0
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/ebtables
  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. endef
  25. define Package/ebtables-utils
  26. $(call Package/ebtables)
  27. DEPENDS += ebtables
  28. TITLE:=ebtables save/restore utilities
  29. endef
  30. define Package/ebtables/description
  31. The ebtables program is a filtering tool for a bridging firewall. The
  32. filtering is focussed on the Link Layer Ethernet frame fields. Apart
  33. from filtering, it also gives the ability to alter the Ethernet MAC
  34. addresses and implement a brouter.
  35. endef
  36. define Package/ebtables-utils/description
  37. $(call Package/ebtables/description)
  38. endef
  39. MAKE_VARS += EXT_LIBSI="$(LIBGCC_S)"
  40. MAKE_FLAGS += \
  41. CFLAGS="$(TARGET_CFLAGS)" \
  42. LIBDIR="/usr/lib/ebtables"
  43. define Package/ebtables/install
  44. $(INSTALL_DIR) $(1)/etc
  45. $(INSTALL_DATA) $(PKG_BUILD_DIR)/ethertypes $(1)/etc/
  46. $(INSTALL_DIR) $(1)/usr/lib/ebtables
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib*.so $(1)/usr/lib/
  48. $(INSTALL_BIN) $(PKG_BUILD_DIR)/extensions/*.so $(1)/usr/lib/ebtables/
  49. $(INSTALL_DIR) $(1)/usr/sbin
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/
  51. endef
  52. define Package/ebtables-utils/install
  53. $(INSTALL_DIR) $(1)/usr/sbin
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-save $(1)/usr/sbin/
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-restore $(1)/usr/sbin/
  56. endef
  57. $(eval $(call BuildPackage,ebtables))
  58. $(eval $(call BuildPackage,ebtables-utils))