Merge pull request #17303 from CarlosDerSeher/feature_bt_agent
[feed/packages.git] / net / shorewall6 / Makefile
1 #
2 # Copyright (C) 2008-2012 OpenWrt.org
3 # Copyright (C) 2017 Willem van den Akker <wvdakker@wilsoft.nl>
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=shorewall6
12 PKG_MAJOR_MINOR_VERSION:=5.2
13 PKG_BUGFIX_MAJOR_VERSION:=8
14 PKG_BUGFIX_MINOR_VERSION:=
15 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
16 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
17 PKG_RELEASE:=3
18
19 PKG_SOURCE_URL:=http://shorewall.org/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
20 http://slovakia.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
21 http://www.shorewall.no/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
22 http://france.shorewall.net/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
23 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
24 PKG_HASH:=e82c3a9538b6548195398dc39c83b01bcf66eb5a22814c915a924b9adc088cd1
25
26 PKG_BUILD_DEPENDS:=HOST_OS_MACOS:fakeuname/host
27
28 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
29 PKG_LICENSE:=GPL-2.0-or-later
30 PKG_LICENSE_FILES:=COPYING
31
32 include $(INCLUDE_DIR)/package.mk
33 ifeq ($(CONFIG_HOST_OS_MACOS),y)
34 include ../../utils/fakeuname/fakeuname.mk
35 endif
36
37 define Package/shorewall6
38 SECTION:=net
39 CATEGORY:=Network
40 DEPENDS:=+ip @IPV6 +ip6tables +kmod-ipt-hashlimit +kmod-ipt-raw6 +iptables-mod-hashlimit +shorewall-core \
41 +perl +perlbase-autoloader +perlbase-autouse +perlbase-dynaloader +perlbase-digest \
42 +perlbase-findbin +perlbase-getopt +perlbase-hash
43 TITLE:=Shorewall6 Central Administration System
44 URL:=http://www.shorewall.net/
45 SUBMENU:=Firewall
46 endef
47
48 define Package/shorewall6/description
49 The Shoreline Firewall, is high-level tool for configuring Netfilter.
50
51 Shorewall allows for central administration of multiple IPv6 firewalls.
52 This is the full Shorewall product which will compile Shorewall scripts
53 It is not recommended to run it on a low memory system.
54
55 Note: This is the IPv6 implementation of Shorewall.
56 This full Shorewal packages also installs Perl which can make the image big (about +2M).
57 endef
58
59 CONFIGURE_ARGS += \
60 vendor=openwrt
61
62 # MacOS bash is too old for shorewall6, use OpenWrt host tools/bash built for macos hosts
63 # use fakeuname to avoid 'if `uname` is Darwin' checks
64 MACOS_ENV := \
65 PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG) \
66 $(BASH)
67
68 CONFIGURE_VARS += \
69 $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV))
70
71 define Package/shorewall6/conffiles
72 /etc/shorewall6/
73 endef
74
75 define Build/Compile
76 DESTDIR=$(PKG_INSTALL_DIR) \
77 $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV)) \
78 $(PKG_BUILD_DIR)/install.sh
79 endef
80
81 define Package/shorewall6/install
82 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
83 $(INSTALL_DIR) $(1)/etc/init.d/
84 $(INSTALL_DIR) $(1)/etc/shorewall6/
85 $(INSTALL_DIR) $(1)/usr/sbin/
86 $(INSTALL_DIR) $(1)/usr/share/shorewall6/
87 $(INSTALL_BIN) ./files/hostname $(1)/etc/shorewall6/
88 $(INSTALL_BIN) ./files/hotplug_iface $(1)/etc/hotplug.d/iface/05-shorewall6
89 $(INSTALL_BIN) ./files/shorewall6.init $(1)/etc/init.d/shorewall6
90 $(INSTALL_BIN) ./files/vardir $(1)/etc/shorewall6/
91 $(CP) $(PKG_INSTALL_DIR)/etc/shorewall6/. $(1)/etc/shorewall6/
92 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shorewall6 $(1)/usr/sbin/
93 $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall6/. $(1)/usr/share/shorewall6/
94 endef
95
96 $(eval $(call BuildPackage,shorewall6))