Fresh pull from upstream 17.01 branch
[librecmc/librecmc.git] / package / network / utils / ebtables / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ebtables
11 PKG_SOURCE_DATE:=2015-10-28
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=git://git.netfilter.org/ebtables
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_VERSION:=4c3e5cd3dbae3ea773e9dcca7cf019b2713af70d
17 PKG_MIRROR_HASH:=997a877da02d6e2141e6d31c5d4dd005737facecfdbea07308c0e1286db8591c
18
19 PKG_LICENSE:=GPL-2.0
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/ebtables
24   SECTION:=net
25   CATEGORY:=Network
26   SUBMENU:=Firewall
27   DEPENDS:=+kmod-ebtables
28   TITLE:=Ethernet bridge firewall administration utility
29   URL:=http://ebtables.sourceforge.net/
30 endef
31
32 define Package/ebtables-utils
33   $(call Package/ebtables)
34   DEPENDS += ebtables
35   TITLE:=ebtables save/restore utilities
36 endef
37
38 define Package/ebtables/description
39         The ebtables program is a filtering tool for a bridging firewall. The
40         filtering is focussed on the Link Layer Ethernet frame fields. Apart
41         from filtering, it also gives the ability to alter the Ethernet MAC
42         addresses and implement a brouter.
43 endef
44
45 define Package/ebtables-utils/description
46         $(call Package/ebtables/description)
47 endef
48
49 MAKE_VARS += EXT_LIBSI="$(LIBGCC_S)"
50
51 MAKE_FLAGS += \
52         CFLAGS="$(TARGET_CFLAGS)" \
53         LIBDIR="/usr/lib/ebtables"
54
55 define Package/ebtables/install
56         $(INSTALL_DIR) $(1)/etc
57         $(INSTALL_DATA) $(PKG_BUILD_DIR)/ethertypes $(1)/etc/
58         $(INSTALL_DIR) $(1)/usr/lib/ebtables
59         $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib*.so $(1)/usr/lib/
60         $(INSTALL_BIN) $(PKG_BUILD_DIR)/extensions/*.so $(1)/usr/lib/ebtables/
61         $(INSTALL_DIR) $(1)/usr/sbin
62         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/
63 endef
64
65 define Package/ebtables-utils/install
66         $(INSTALL_DIR) $(1)/usr/sbin
67         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-save $(1)/usr/sbin/
68         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-restore $(1)/usr/sbin/
69 endef
70
71 $(eval $(call BuildPackage,ebtables))
72 $(eval $(call BuildPackage,ebtables-utils))