Merge pull request #3987 from stangri/vpnbypass
[feed/packages.git] / net / vpnbypass / Makefile
1 # Copyright (c) 2017 Stan Grishin (stangri@melmac.net)
2 # This is free software, licensed under the GNU General Public License v3.
3
4 include $(TOPDIR)/rules.mk
5
6 PKG_NAME:=vpnbypass
7 PKG_VERSION:=1.1.1
8 PKG_RELEASE:=1
9 PKG_LICENSE:=GPL-3.0+
10 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
11
12 include $(INCLUDE_DIR)/package.mk
13
14 define Package/$(PKG_NAME)
15 SECTION:=net
16 CATEGORY:=Network
17 DEPENDS:=+ip-full +ipset +iptables +ubox +dnsmasq-full
18 CONFLICTS:=ip dnsmasq
19 TITLE:=Simple VPN Bypass Service
20 PKGARCH:=all
21 endef
22
23 define Package/$(PKG_NAME)/description
24 This service can be used to enable simple VPN split tunnelling.
25 Supports accessing domains, IP ranges outside of your VPN tunnel.
26 Also supports dedicating local ports/IP ranges for direct internet access (outside of your VPN tunnel).
27 Please see the README for further information.
28 endef
29
30 define Package/$(PKG_NAME)/conffiles
31 /etc/config/vpnbypass
32 endef
33
34 define Build/Prepare
35 sed -i "s|^\(PKG_NAME\).*|\1='$(PKG_NAME)'|" ./files/vpnbypass.init
36 sed -i "s|^\(PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" ./files/vpnbypass.init
37 endef
38
39 define Build/Configure
40 endef
41
42 define Build/Compile
43 endef
44
45 define Package/$(PKG_NAME)/install
46 $(INSTALL_DIR) $(1)/etc/init.d
47 $(INSTALL_BIN) ./files/vpnbypass.init $(1)/etc/init.d/vpnbypass
48 $(INSTALL_DIR) $(1)/etc/config
49 $(INSTALL_CONF) ./files/vpnbypass.conf $(1)/etc/config/vpnbypass
50 $(INSTALL_DIR) $(1)/etc/hotplug.d/firewall
51 $(INSTALL_DATA) ./files/vpnbypass.hotplug $(1)/etc/hotplug.d/firewall/92-vpnbypass
52 endef
53
54 $(eval $(call BuildPackage,$(PKG_NAME)))