summaryrefslogtreecommitdiff
path: root/repo/system/networkmanager.xibuild
blob: c2c8fbdfb92d0c603d0e3562176bc5760fb8c66f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh

MAKEDEPS="grep meson ninja python intltool glib"
DEPS="jansson libndp curl wpa_supplicant newt nss polkit libpsl dbus gobject-introspection dhcp"

PKG_VER=1.35.5
SOURCE=https://download.gnome.org/sources/NetworkManager/${PKG_VER%.*}/NetworkManager-$PKG_VER.tar.xz

ADDITIONAL="
networkmanager.conf
networkmanager-dispatcher.initd
networkmanager.initd
networkmanager.rules
"

DESC="Network connection manager and user applications"

prepare () {
    ggrep -rl '^#!.*python$' | xargs sed -i '1s/python/&3/'
    dbus-uuidgen --ensure
}

build () {
    mkdir build &&
    cd    build &&

    meson --prefix=/usr              \
          --buildtype=release        \
          -Dlibaudit=no              \
          -Dlibpsl=false             \
          -Dnmtui=true               \
          -Dovs=false                \
          -Dppp=false                \
          -Dselinux=false            \
          -Dsession_tracking=elogind \
          -Dmodem_manager=false      \
          -Dsystemdsystemunitdir=no  \
          -Dsystemd_journal=false    \
          -Dqt=false                 \
          .. &&
    ninja
}

package () {
    DESTDIR=$PKG_DEST ninja install &&
    mv $PKG_DEST/usr/share/doc/NetworkManager \
     $PKG_DEST/usr/share/doc/NetworkManager-$PKG_VER

	install -m644 -D networkmanager.rules \
		"$PKG_DEST/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"

    cd ..
	install -m755 -D networkmanager.initd $PKG_DEST/etc/init.d/networkmanager
	install -m755 -D networkmanager-dispatcher.initd $PKG_DEST/etc/init.d/networkmanager-dispatcher
	install -m755 -D networkmanager.conf $PKG_DEST/etc/NetworkManager/NetworkManager.conf
}