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