shairplay: remove
[feed/packages.git] / net / shorewall-core / 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-core
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:=39996b9697a2017947049ad3f03cb278e8f939ff924b2bb4bf2a0bc17c59988e
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-core
38 SECTION:=net
39 CATEGORY:=Network
40 TITLE:=Shorewall Core
41 URL:=http://www.shorewall.net/
42 SUBMENU:=Firewall
43 endef
44
45 define Package/shorewall-core/description
46 The Shoreline Firewall, is high-level tool for configuring Netfilter.
47 This package provides the core Shorewall libraries installed in /usr/share/shorewall/,
48 which are required for the rest of the Shorewall packages to work.
49 endef
50
51 define Package/shorewall-core/conffiles
52 /usr/share/shorewall/shorewallrc
53 endef
54
55 CONFIGURE_ARGS += \
56 vendor=openwrt
57
58 # MacOS bash is too old for shorewall-core, use OpenWrt host tools/bash built for macos hosts
59 # use fakeuname to avoid 'if `uname` is Darwin' checks
60 MACOS_ENV := \
61 PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG) \
62 $(BASH)
63
64 CONFIGURE_VARS += \
65 $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV))
66
67 define Build/Compile
68 DESTDIR=$(PKG_INSTALL_DIR) \
69 $(if $(CONFIG_HOST_OS_MACOS),$(MACOS_ENV)) \
70 $(PKG_BUILD_DIR)/install.sh
71 endef
72
73 define Package/shorewall-core/install
74 $(INSTALL_DIR) $(1)/usr/share/shorewall/
75 $(INSTALL_DIR) $(1)/usr/sbin/
76 $(CP) $(PKG_INSTALL_DIR)/usr/share/shorewall $(1)/usr/share/
77 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/shorewall/wait4ifup $(1)/usr/share/shorewall/
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/shorewall $(1)/usr/sbin/
79 endef
80
81 $(eval $(call BuildPackage,shorewall-core))