e59a9657ea7d23f49689edd0e7afb3d5f30d9672
[feed/packages.git] / net / openfortivpn / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=openfortivpn
11 PKG_VERSION:=1.14.1
12 PKG_RELEASE:=8
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/adrienverge/openfortivpn/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=bc62fc6ecaaa6c6f8f2510e14a067a0cb9762158d9460c04555990bba44b50ca
17
18 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
19 PKG_LICENSE:=GPL-3.0-or-later OpenSSL
20 PKG_LICENSE_FILES:=LICENSE LICENSE.OpenSSL
21
22 PKG_BUILD_PARALLEL:=1
23 PKG_INSTALL:=1
24
25 PKG_FIXUP:=autoreconf
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/openfortivpn
30 SUBMENU:=VPN
31 SECTION:=net
32 CATEGORY:=Network
33 TITLE:=Fortinet SSL VPN client
34 URL:=https://github.com/adrienverge/openfortivpn
35 DEPENDS:=+ppp +libopenssl +resolveip
36 endef
37
38 define Package/openfortivpn/description
39 An open implementation of Fortinet's proprietary PPP+SSL VPN solution
40 It spawns a pppd process and operates the communication between the gateway and this process.
41 It is compatible with Fortinet VPNs.
42 endef
43
44 CONFIGURE_ARGS += \
45 --enable-proc \
46 --with-rt_dst="yes" \
47 --disable-resolvconf \
48 --with-resolvconf=DISABLED \
49 --with-pppd="/usr/sbin/pppd"
50
51 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
52
53 define Package/openfortivpn/install
54 $(INSTALL_DIR) \
55 $(1)/usr/sbin \
56 $(1)/lib/netifd/proto \
57 $(1)/etc/hotplug.d/iface
58
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openfortivpn $(1)/usr/sbin/
60 $(INSTALL_BIN) ./files/openfortivpn-wrapper $(1)/usr/sbin/
61 $(INSTALL_BIN) ./files/openfortivpn.sh $(1)/lib/netifd/proto/
62 $(INSTALL_BIN) ./files/14-openforticlient $(1)/etc/hotplug.d/iface/
63 $(INSTALL_BIN) ./files/openfortivpn-ppp-up $(1)/lib/netifd/openfortivpn-ppp-up
64 endef
65
66 $(eval $(call BuildPackage,openfortivpn))