1SUMMARY = "Fortinet SSLVPN support for NetworkManager" 2SECTION = "net/misc" 3 4LICENSE = "GPL-2.0-or-later" 5LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" 6 7DEPENDS = "glib-2.0-native libxml2-native networkmanager ppp" 8 9inherit gnomebase gettext useradd 10 11SRC_URI = " \ 12 ${GNOME_MIRROR}/NetworkManager-fortisslvpn/${@gnome_verdir("${PV}")}/NetworkManager-fortisslvpn-${PV}.tar.xz \ 13 file://0001-fix-ppp-2.5.0-build.patch \ 14 file://0002-fix-ppp-2.5.0-build.patch \ 15" 16SRC_URI[sha256sum] = "b055e26349b516b23585798ab3ef57b436b014800e92a8ac732cfc8e76c5dafa" 17 18S = "${WORKDIR}/NetworkManager-fortisslvpn-${PV}" 19 20# meta-gnome in layers is required using gnome: 21PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret," 22PACKAGECONFIG[gtk4] = "--with-gtk4,--without-gtk4,gtk4," 23 24EXTRA_OECONF = "--with-pppd-plugin-dir=${libdir}/pppd/${@get_ppp_version(d)}" 25 26def get_ppp_version(d): 27 import re 28 29 pppd_plugin = d.expand('${STAGING_LIBDIR}/pppd') 30 if not os.path.isdir(pppd_plugin): 31 return None 32 33 bb.debug(1, "pppd plugin dir %s" % pppd_plugin) 34 r = re.compile(r"\d*\.\d*\.\d*") 35 for f in os.listdir(pppd_plugin): 36 if os.path.isdir(os.path.join(pppd_plugin, f)): 37 ma = r.match(f) 38 if ma: 39 bb.debug(1, "pppd version dir %s" % f) 40 return f 41 else: 42 bb.debug(1, "under pppd plugin dir %s" % f) 43 44 return None 45 46# gdbus-codegen requires target directories to exist 47do_configure:append() { 48 mkdir -p ${B}/properties 49 mkdir -p ${B}/src 50} 51 52USERADD_PACKAGES = "${PN}" 53USERADD_PARAM:${PN} = "--system nm-fortisslvpn" 54 55FILES:${PN} += " \ 56 ${libdir}/NetworkManager/*.so \ 57 ${libdir}/pppd/*/*.so \ 58 ${nonarch_libdir}/NetworkManager/VPN/nm-fortisslvpn-service.name \ 59" 60 61FILES:${PN}-staticdev += " \ 62 ${libdir}/NetworkManager/*.a \ 63 ${libdir}/pppd/*/*.a \ 64" 65 66RDEPENDS:${PN} = " \ 67 networkmanager \ 68 openfortivpn \ 69 ppp \ 70" 71