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.

68 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2019 - Lucian Cristian <lucian.cristian@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v3.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=openfortivpn
  9. PKG_VERSION:=1.17.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/adrienverge/openfortivpn/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=c674c59cf3201a55d56cb503053982752fb641b13a85ea406b8a7e7df301e30f
  14. PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  15. PKG_LICENSE:=GPL-3.0-or-later OpenSSL
  16. PKG_LICENSE_FILES:=LICENSE LICENSE.OpenSSL
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/openfortivpn
  22. SUBMENU:=VPN
  23. SECTION:=net
  24. CATEGORY:=Network
  25. TITLE:=Fortinet SSL VPN client
  26. URL:=https://github.com/adrienverge/openfortivpn
  27. DEPENDS:=+ppp +libopenssl
  28. endef
  29. define Package/openfortivpn/description
  30. An open implementation of Fortinet's proprietary PPP+SSL VPN solution
  31. It spawns a pppd process and operates the communication between the gateway and this process.
  32. It is compatible with Fortinet VPNs.
  33. endef
  34. CONFIGURE_ARGS += \
  35. --enable-proc \
  36. --with-rt_dst="yes" \
  37. --disable-resolvconf \
  38. --with-resolvconf=DISABLED \
  39. --with-pppd="/usr/sbin/pppd"
  40. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  41. define Package/openfortivpn/install
  42. $(INSTALL_DIR) \
  43. $(1)/usr/sbin \
  44. $(1)/lib/netifd/proto \
  45. $(1)/etc/hotplug.d/iface \
  46. $(1)/etc/openfortivpn \
  47. $(1)/lib/upgrade/keep.d
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openfortivpn $(1)/usr/sbin/
  49. $(INSTALL_BIN) ./files/openfortivpn-wrapper $(1)/usr/sbin/
  50. $(INSTALL_BIN) ./files/openfortivpn.sh $(1)/lib/netifd/proto/
  51. $(INSTALL_BIN) ./files/openfortivpn-ppp-up $(1)/lib/netifd/openfortivpn-ppp-up
  52. $(INSTALL_DATA) ./files/openfortivpn.upgrade $(1)/lib/upgrade/keep.d/openfortivpn
  53. endef
  54. $(eval $(call BuildPackage,openfortivpn))