OCaml 4.14.0 rebuild
[arch-packages.git] / networkmanager / trunk / PKGBUILD
blob8b02aeb855b67b9b0a0400d3e0129cf2a3f4f5dd
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinxu.org>
3 # Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
4 # Contributor: Tor Krill <tor@krill.nu>
5 # Contributor: Will Rea <sillywilly@gmail.com>
6 # Contributor: Valentine Sinitsyn <e_val@inbox.ru>
8 pkgbase=networkmanager
9 pkgname=(networkmanager libnm nm-cloud-setup)
10 pkgver=1.38.2
11 pkgrel=2
12 pkgdesc="Network connection manager and user applications"
13 url="https://networkmanager.dev/"
14 arch=(x86_64)
15 license=(GPL)
16 _pppver=2.4.9
17 makedepends=(intltool dhclient dhcpcd iptables-nft gobject-introspection gtk-doc
18              "ppp=$_pppver" modemmanager iproute2 nss polkit wpa_supplicant curl
19              systemd libmm-glib libnewt libndp libteam nftables vala perl-yaml
20              python-gobject git vala jansson bluez-libs glib2-docs iwd dnsmasq
21              openresolv libpsl audit meson)
22 checkdepends=(libx11 python-dbus)
23 options=(debug)
24 _commit=abfd2d6ea729926bff0ddafa1367a54f6d6f4230  # tags/1.38.2^0
25 source=("git+https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git#commit=$_commit")
26 b2sums=('SKIP')
28 pkgver() {
29   cd NetworkManager
30   git describe --tags | sed 's/-dev/dev/;s/-rc/rc/;s/[^-]*-g/r&/;s/-/+/g'
33 prepare() {
34   cd NetworkManager
37 build() {
38   local meson_options=(
39     # system paths
40     -D dbus_conf_dir=/usr/share/dbus-1/system.d
42     # platform
43     -D dist_version="$pkgver-$pkgrel"
44     -D session_tracking_consolekit=false
45     -D suspend_resume=systemd
46     -D modify_system=true
47     -D selinux=false
49     # features
50     -D iwd=true
51     -D pppd_plugin_dir=/usr/lib/pppd/$_pppver
52     -D teamdctl=true
53     -D nm_cloud_setup=true
54     -D bluez5_dun=true
55     -D ebpf=true
57     # configuration plugins
58     -D config_plugins_default=keyfile
60     # handlers for resolv.conf
61     -D netconfig=no
62     -D config_dns_rc_manager_default=symlink
64     # miscellaneous
65     -D vapi=true
66     -D docs=true
67     -D more_asserts=no
68     -D more_logging=false
69     -D qt=false
70   )
72   arch-meson NetworkManager build "${meson_options[@]}"
73   meson compile -C build
76 check() {
77   meson test -C build --print-errorlogs
80 _pick() {
81   local p="$1" f d; shift
82   for f; do
83     d="$srcdir/$p/${f#$pkgdir/}"
84     mkdir -p "$(dirname "$d")"
85     mv "$f" "$d"
86     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
87   done
90 package_networkmanager() {
91   depends=(libnm iproute2 wpa_supplicant libmm-glib libnewt libndp libteam curl
92            bluez-libs libpsl audit mobile-broadband-provider-info)
93   optdepends=(
94     'polkit: let non-root users control networking'
95     'dnsmasq: connection sharing'
96     'nftables: connection sharing'
97     'iptables: connection sharing'
98     'bluez: Bluetooth support'
99     'ppp: dialup connection support'
100     'modemmanager: cellular network support'
101     'iwd: wpa_supplicant alternative'
102     'dhclient: alternative DHCP client'
103     'dhcpcd: alternative DHCP client'
104     'openresolv: alternative resolv.conf manager'
105     'firewalld: firewall support'
106   )
107   backup=(etc/NetworkManager/NetworkManager.conf)
109   meson install -C build --destdir "$pkgdir"
111   cd "$pkgdir"
113   # /etc/NetworkManager
114   install -d etc/NetworkManager/{conf,dnsmasq}.d
115   install -dm700 etc/NetworkManager/system-connections
116   install -m644 /dev/stdin etc/NetworkManager/NetworkManager.conf <<END
117 # Configuration file for NetworkManager.
118 # See "man 5 NetworkManager.conf" for details.
121   # packaged configuration
122   install -Dm644 /dev/stdin usr/lib/NetworkManager/conf.d/20-connectivity.conf <<END
123 [connectivity]
124 uri=http://ping.archlinux.org/nm-check.txt
127   shopt -s globstar
129   _pick libnm usr/include/libnm
130   _pick libnm usr/lib/girepository-1.0/NM-*
131   _pick libnm usr/lib/libnm.*
132   _pick libnm usr/lib/pkgconfig/libnm.pc
133   _pick libnm usr/share/gir-1.0/NM-*
134   _pick libnm usr/share/gtk-doc/html/libnm
135   _pick libnm usr/share/vala/vapi/libnm.*
137   _pick cloud usr/lib/**/*nm-cloud-setup*
138   _pick cloud usr/share/man/*/nm-cloud-setup*
140   # Not actually packaged (https://bugs.archlinux.org/task/69138)
141   _pick ovs usr/lib/systemd/system/NetworkManager.service.d/NetworkManager-ovs.conf
143   # Restore empty dir
144   install -d usr/lib/NetworkManager/dispatcher.d/no-wait.d
147 package_libnm() {
148   pkgdesc="NetworkManager client library"
149   license=(LGPL)
150   depends=(glib2 nss util-linux-libs jansson systemd-libs)
151   provides=(libnm.so)
153   mv libnm/* "$pkgdir"
156 package_nm-cloud-setup() {
157   pkgdesc="Automatically configure NetworkManager in cloud"
158   depends=(networkmanager)
160   mv cloud/* "$pkgdir"
163 # vim:set sw=2 et: