You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

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