1SUMMARY = "NetworkManager-openvpn-plugin"
2SECTION = "net/misc"
3
4LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c"
6
7DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native"
8
9GNOMEBASEBUILDCLASS = "autotools"
10inherit gnomebase useradd gettext systemd
11
12SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
13
14SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}"
15
16SRC_URI[sha256sum] = "903fd4c0aebd2aa7ac70c9d8c2bed8df922655d22d764514403566ae89b7e886"
17
18S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
19
20# meta-gnome in layers is required using gnome:
21PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret"
22
23do_configure:append() {
24    # network-manager-openvpn.metainfo.xml is created in source folder but
25    # compile expects it in build folder. As long as nobody comes up with a
26    # better solution just support build:
27    if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then
28        mkdir -p ${B}/appdata
29        cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/
30    fi
31}
32
33do_install:append () {
34    rm -rf ${D}${libdir}/NetworkManager/*.la
35}
36
37# Create user and group nm-openvpn that are needed since version 1.0.6
38USERADD_PACKAGES = "${PN}"
39USERADD_PARAM:${PN} = "--system nm-openvpn"
40
41FILES:${PN} += " \
42    ${datadir}/dbus-1 \
43    ${datadir}/metainfo \
44    ${libdir}/NetworkManager/*.so \
45    ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
46"
47
48FILES:${PN}-staticdev += " \
49    ${libdir}/NetworkManager/*.a \
50"
51
52RDEPENDS:${PN} = " \
53    networkmanager \
54    openvpn \
55"
56