Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | SUMMARY = "NetworkManager" |
| 2 | HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" |
| 3 | SECTION = "net/misc" |
| 4 | |
| 5 | LICENSE = "GPLv2+" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \ |
| 7 | file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \ |
| 8 | file://docs/api/html/license.html;md5=2d56a1b0c42e388aa86aef59b154e8c3 \ |
| 9 | " |
| 10 | |
| 11 | DEPENDS = " \ |
| 12 | intltool-native \ |
| 13 | libxslt-native \ |
| 14 | libnl \ |
| 15 | libgudev \ |
| 16 | util-linux \ |
| 17 | libndp \ |
| 18 | libnewt \ |
| 19 | polkit \ |
| 20 | jansson \ |
| 21 | curl \ |
| 22 | " |
| 23 | |
| 24 | inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection gtk-doc |
| 25 | |
| 26 | SRC_URI = " \ |
| 27 | ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ |
| 28 | file://0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \ |
| 29 | file://0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ |
| 30 | file://0003-Do-not-create-settings-settings-property-documentati.patch \ |
| 31 | file://0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch \ |
| 32 | file://musl/0001-musl-basic.patch \ |
| 33 | file://musl/0002-musl-dlopen-configure-ac.patch \ |
| 34 | file://musl/0003-musl-network-support.patch \ |
| 35 | file://musl/0004-musl-process-util.patch \ |
| 36 | file://musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch \ |
| 37 | file://musl/0006-Add-a-strndupa-replacement-for-musl.patch \ |
| 38 | " |
| 39 | SRC_URI[md5sum] = "54ce62f0aa18ef6c5e754eaac47494ac" |
| 40 | SRC_URI[sha256sum] = "35a3ede4c7d12d6212033c9e44cb82b7692f38063b53a067567f02f5937c8c18" |
| 41 | |
| 42 | UPSTREAM_CHECK_URI = "${GNOME_MIRROR}/NetworkManager/1.10/" |
| 43 | UPSTREAM_CHECK_REGEX = "NetworkManager\-(?P<pver>1\.10(\.\d+)+).tar.xz" |
| 44 | |
| 45 | S = "${WORKDIR}/NetworkManager-${PV}" |
| 46 | |
| 47 | EXTRA_OECONF = " \ |
| 48 | --disable-ifcfg-rh \ |
| 49 | --disable-more-warnings \ |
| 50 | --with-iptables=${sbindir}/iptables \ |
| 51 | --with-tests \ |
| 52 | --with-nmtui=yes \ |
| 53 | " |
| 54 | |
| 55 | # gobject-introspection related |
| 56 | GI_DATA_ENABLED_libc-musl = "False" |
| 57 | |
| 58 | # stolen from https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/template |
| 59 | CFLAGS_libc-musl_append = " \ |
| 60 | -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv \ |
| 61 | -D__USE_POSIX199309 -DRTLD_DEEPBIND=0 \ |
| 62 | " |
| 63 | |
| 64 | do_compile_prepend() { |
| 65 | export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs" |
| 66 | } |
| 67 | |
| 68 | PACKAGECONFIG ??= "nss ifupdown dhclient dnsmasq \ |
| 69 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ |
| 70 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \ |
| 71 | ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \ |
| 72 | " |
| 73 | PACKAGECONFIG[systemd] = " \ |
| 74 | --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \ |
| 75 | --without-systemdsystemunitdir, \ |
| 76 | polkit \ |
| 77 | " |
| 78 | PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" |
| 79 | # consolekit is not picked by shlibs, so add it to RDEPENDS too |
| 80 | PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" |
| 81 | PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" |
| 82 | PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" |
| 83 | # Use full featured dhcp client instead of internal one |
| 84 | PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client" |
| 85 | PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq" |
| 86 | PACKAGECONFIG[nss] = "--with-crypto=nss,,nss" |
| 87 | PACKAGECONFIG[glib] = "--with-libnm-glib,,dbus-glib-native dbus-glib" |
| 88 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls" |
| 89 | PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,,wpa-supplicant" |
| 90 | PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown" |
| 91 | PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free" |
| 92 | |
| 93 | PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \ |
| 94 | ${PN}-nmtui ${PN}-nmtui-doc \ |
| 95 | ${PN}-adsl \ |
| 96 | " |
| 97 | |
| 98 | FILES_libnmutil += "${libdir}/libnm-util.so.*" |
| 99 | FILES_libnmglib += "${libdir}/libnm-glib.so.*" |
| 100 | FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*" |
| 101 | |
| 102 | FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so" |
| 103 | |
| 104 | FILES_${PN} += " \ |
| 105 | ${libexecdir} \ |
| 106 | ${libdir}/NetworkManager/${PV}/*.so \ |
| 107 | ${nonarch_libdir}/NetworkManager/VPN \ |
| 108 | ${nonarch_libdir}/NetworkManager/conf.d \ |
| 109 | ${datadir}/polkit-1 \ |
| 110 | ${datadir}/dbus-1 \ |
| 111 | ${base_libdir}/udev/* \ |
| 112 | ${systemd_unitdir}/system \ |
| 113 | " |
| 114 | |
| 115 | RRECOMMENDS_${PN} += "iptables \ |
| 116 | ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ |
| 117 | " |
| 118 | RCONFLICTS_${PN} = "connman" |
| 119 | |
| 120 | FILES_${PN}-dev += " \ |
| 121 | ${datadir}/NetworkManager/gdb-cmd \ |
| 122 | ${libdir}/pppd/*/*.la \ |
| 123 | ${libdir}/NetworkManager/*.la \ |
| 124 | ${libdir}/NetworkManager/${PV}/*.la \ |
| 125 | " |
| 126 | |
| 127 | FILES_${PN}-nmtui = " \ |
| 128 | ${bindir}/nmtui \ |
| 129 | ${bindir}/nmtui-edit \ |
| 130 | ${bindir}/nmtui-connect \ |
| 131 | ${bindir}/nmtui-hostname \ |
| 132 | " |
| 133 | |
| 134 | FILES_${PN}-nmtui-doc = " \ |
| 135 | ${mandir}/man1/nmtui* \ |
| 136 | " |
| 137 | |
| 138 | SYSTEMD_SERVICE_${PN} = "NetworkManager.service NetworkManager-dispatcher.service" |
| 139 | |
| 140 | do_install_append() { |
| 141 | rm -rf ${D}/run ${D}${localstatedir}/run |
| 142 | } |