libidn: update to 1.42
[feed/packages.git] / net / shorewall6-lite / 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-lite
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:=086764bb976d199b45563e39b1ab9a131ccb521d60d186f606dd8bbcee7fcada
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
33 include $(INCLUDE_DIR)/package.mk
34 ifeq ($(CONFIG_HOST_OS_MACOS),y)
35 include ../../utils/fakeuname/fakeuname.mk
36 endif
37
38 define Package/shorewall6-lite
39 SECTION:=net
40 CATEGORY:=Network
41 DEPENDS:=+ip @IPV6 +ip6tables +shorewall-core
42 TITLE:=Shorewall6 Lite
43 URL:=http://www.shorewall.net/
44 SUBMENU:=Firewall
45 endef
46
47 define Package/shorewall6-lite/description
48 The Shoreline Firewall, is high-level tool for configuring Netfilter.
49
50 Shorewall6 allows for central administration of multiple IPv6 firewalls
51 through use of Shorewall6 lite. The full Shorewall6 product is installed
52 on a central administrative system where compiled Shorewall6 scripts are
53 generated. These scripts are copied to the firewall systems where they
54 run under the control of Shorewall6-lite.
55
56 Note: This is the IPv6 implementation of Shorewall.
57 endef
58
59 define Package/shorewall6-lite/conffiles
60 /etc/shorewall6-lite/
61 endef
62
63 CONFIGURE_ARGS += \
64 vendor=openwrt
65
66 # MacOS bash is too old for shorewall6-lite, use OpenWrt host tools/bash built for macos hosts
67 # use fakeuname to avoid 'if `uname` is Darwin' checks
68 MACOS_ENV := \
69 PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG) \
70 $(BASH)
71
72 CONFIGURE_VARS += \
73 $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV))
74
75 # install.sh explicitly defines PATH= so fakeuname doesn't work. Remove PATH= on macos
76 define Build/Prepare
77 $(call Build/Prepare/Default)
78 ifeq ($(CONFIG_HOST_OS_MACOS),y)
79 $(SED) '/^PATH=/d' $(PKG_BUILD_DIR)/install.sh
80 endif
81 endef
82
83 define Build/Compile
84 DESTDIR=$(PKG_INSTALL_DIR) \
85 $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV)) \
86 $(PKG_BUILD_DIR)/install.sh
87 endef
88
89 define Package/shorewall6-lite/install
90 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface/
91 $(INSTALL_DIR) $(1)/etc/init.d/
92 $(INSTALL_DIR) $(1)/etc/shorewall6-lite/state/
93 $(INSTALL_DIR) $(1)/usr/sbin/
94 $(INSTALL_DIR) $(1)/usr/share/shorewall6-lite/
95 $(CP) $(PKG_INSTALL_DIR)/etc/shorewall6-lite/ $(1)/etc/
96 $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall6-lite/ $(1)/usr/share/
97 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shorewall6-lite $(1)/usr/sbin/
98 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall6-lite/shorecap $(1)/usr/share/shorewall6-lite/
99 $(INSTALL_BIN) ./files/hostname $(1)/usr/share/shorewall6-lite/
100 $(INSTALL_BIN) ./files/hotplug_iface $(1)/etc/hotplug.d/iface/05-shorewall6-lite
101 $(INSTALL_BIN) ./files/shorewall6-lite.init $(1)/etc/init.d/shorewall6-lite
102 $(INSTALL_BIN) ./files/vardir $(1)/etc/shorewall6-lite/
103 endef
104
105 $(eval $(call BuildPackage,shorewall6-lite))