67cc14a76089b64b94c6dd21304876d72783aead
[openwrt/staging/hauke.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:=2018-06-27
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=https://git.netfilter.org/ebtables
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_VERSION:=48cff25dfea5b37e16ba5dc6601e98ab140f5f99
17 PKG_MIRROR_HASH:=1327cdc3402e5e3056819e4e9b6f9d4a5bfd401f2c4f58447afb2c3c73fc8aac
18
19 PKG_LICENSE:=GPL-2.0
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/ebtables-legacy
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 PROVIDES:=ebtables
31 ALTERNATIVES:=\
32 200:/usr/sbin/ebtables:/usr/sbin/ebtables-legacy
33 endef
34
35 define Package/ebtables-legacy-utils
36 $(call Package/ebtables-legacy)
37 DEPENDS:=ebtables-legacy
38 TITLE:=ebtables save/restore utilities
39 PROVIDES:=ebtables-utils
40 ALTERNATIVES:=\
41 200:/usr/sbin/ebtables-restore:/usr/sbin/ebtables-legacy-restore
42 endef
43
44 define Package/ebtables-legacy/description
45 The ebtables program is a filtering tool for a bridging firewall. The
46 filtering is focussed on the Link Layer Ethernet frame fields. Apart
47 from filtering, it also gives the ability to alter the Ethernet MAC
48 addresses and implement a brouter.
49 endef
50
51 define Package/ebtables-legacy-utils/description
52 $(call Package/ebtables-legacy/description)
53 endef
54
55 MAKE_VARS += EXT_LIBSI="$(LIBGCC_S)"
56
57 MAKE_FLAGS += \
58 CFLAGS="$(TARGET_CFLAGS)" \
59 LIBDIR="/usr/lib/ebtables"
60
61 define Package/ebtables-legacy/install
62 $(INSTALL_DIR) $(1)/etc
63 $(INSTALL_DATA) $(PKG_BUILD_DIR)/ethertypes $(1)/etc/
64 $(INSTALL_DIR) $(1)/usr/lib/ebtables
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib*.so $(1)/usr/lib/
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/extensions/*.so $(1)/usr/lib/ebtables/
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables $(1)/usr/sbin/ebtables-legacy
69 endef
70
71 define Package/ebtables-legacy-utils/install
72 $(INSTALL_DIR) $(1)/usr/sbin
73 #ebtables-save depends on perl and is just broken
74 #$(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-save $(1)/usr/sbin/ebtables-legacy-save
75 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ebtables-restore $(1)/usr/sbin/ebtables-legacy-restore
76 endef
77
78 $(eval $(call BuildPackage,ebtables-legacy))
79 $(eval $(call BuildPackage,ebtables-legacy-utils))