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