summaryrefslogtreecommitdiff
path: root/pcr/networkmanager-elogind/PKGBUILD
blob: 4e1524bea7cbebcd0456b2d22f1044212f6e6176 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinxu.org>
# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
# Contributor: Tor Krill <tor@krill.nu>
# Contributor: Will Rea <sillywilly@gmail.com>
# Contributor: Valentine Sinitsyn <e_val@inbox.ru>

_pppver=2.4.7

pkgname=networkmanager-elogind
pkgver=1.10.0
pkgrel=1.parabola1
pkgdesc="Network Management daemon"
arch=('i686' 'x86_64' 'armv7h')
license=('GPL2' 'LGPL2.1')
url="http://www.gnome.org/projects/NetworkManager/"
provides=('networkmanager')
conflicts=('networkmanager' 'networkmanager-consolekit')
# replaces=('networkmanager-consolekit')
makedepends=(intltool dhclient iptables gobject-introspection gtk-doc "ppp=$_pppver" modemmanager
             dbus-glib iproute2 nss polkit wpa_supplicant libsoup elogind libgudev libmm-glib
             libnewt libndp libteam vala perl-yaml python-gobject git vala jansson bluez-libs
             glib2-docs eudev-systemd)
checkdepends=('libx11' 'python-dbus')
depends=('libnm-glib' 'iproute2' 'polkit' 'wpa_supplicant' 'libsoup' 'libmm-glib' 'libnewt' 'libndp' 'libteam' 'elogind')
optdepends=('dnsmasq: connection sharing'
            'bluez: Bluetooth support'
            'openresolv: resolvconf support'
            'ppp: dialup connection support'
            'rp-pppoe: ADSL support'
            'dhclient: External DHCP client'
            'modemmanager: cellular network support'
            'networkmanager-openrc: networkmanager initscript')
backup=('etc/NetworkManager/NetworkManager.conf')
_commit=1193fb1b08fe45ce8713220132184581c4669362  # tags/1.10.0^0
source=("git+https://anongit.freedesktop.org/git/NetworkManager/NetworkManager#commit=$_commit"
        NetworkManager.conf 20-connectivity.conf)
sha512sums=('SKIP'
            '25866b000096003d4c90decb6e19a742cf62792ddd217616b12a6415cd05514a6023d9986743b548a99d0e1c70acd0a3849144807228a59361b3493c879ffa56'
            'da52ba9603c279c1c865cc3bf63606e1daeeb2a22c68e4b0077e15c312e251b494c4f0c94bcb27c9f6923f8b69cd7ab9062d9b7ce499222d3d2240864ed9345f')

prepare() {
  mkdir -p libnm{,-glib}/usr/{include,lib/{girepository-1.0,pkgconfig},share/{gir-1.0,gtk-doc/html,vala/vapi}}

  cd NetworkManager
  NOCONFIGURE=1 ./autogen.sh
}

pkgver() {
  cd NetworkManager
  git describe | sed 's/-dev/dev/;s/-/+/g'
}

build() {
    cd NetworkManager #-$pkgver
    ./configure --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
        runstatedir=/run \
        --sbindir=/usr/bin \
        --libexecdir=/usr/lib/NetworkManager \
        --disable-ifcfg-rh \
        --disable-ifcfg-suse \
        --disable-ifnet \
        --disable-ifupdown \
        --disable-lto \
        --disable-more-warnings \
        --disable-static \
        --enable-bluez5-dun \
        --enable-concheck \
        --enable-config-plugin-ibft \
        --enable-gtk-doc \
        --enable-introspection \
        --enable-json-validation \
        --enable-ld-gc \
        --enable-modify-system \
        --enable-polkit \
        --enable-polkit-agent \
        --enable-teamdctl \
        --enable-wifi \
        --with-config-dhcp-default=dhclient \
        --with-config-dns-rc-manager-default=resolvconf \
        --with-config-logging-backend-default=journal \
        --with-config-plugins-default=keyfile,ibft \
        --with-crypto=nss \
        --with-dbus-sys-dir=/usr/share/dbus-1/system.d \
        --with-dhclient=/usr/bin/dhclient \
        --with-dist-version="$pkgver-$pkgrel, Parabola GNU/Linux-libre" \
        --with-dnsmasq=/usr/bin/dnsmasq \
        --with-dnssec-trigger=/usr/lib/dnssec-trigger \
        --with-hostname-persist=default \
        --with-iptables=/usr/bin/iptables \
        --with-kernel-firmware-dir=/usr/lib/firmware \
        --with-libnm-glib \
        --with-libsoup \
        --with-modem-manager-1 \
        --with-nmcli \
        --with-nmtui \
        --with-pppd-plugin-dir=/usr/lib/pppd/$_pppver \
        --with-pppd=/usr/bin/pppd \
        --with-resolvconf=/usr/bin/resolvconf \
        --with-session-tracking=elogind \
        --with-suspend-resume=elogind \
        --with-system-ca-path=/etc/ssl/certs \
        --without-systemd-journal \
        --without-systemd-logind \
        --with-udev-dir=/usr/lib/udev \
        --with-wext \
        --without-consolekit \
        --without-dhcpcd \
        --without-libaudit \
        --without-netconfig \
        --without-ofono \
        --without-selinux

    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    make
}

check() {
    cd NetworkManager
    make -k check
}

package() {
    cd NetworkManager
    make DESTDIR="$pkgdir" install

    install -dm700 "$pkgdir/etc/NetworkManager/system-connections"
    install -d "$pkgdir"/etc/NetworkManager/{conf,dnsmasq}.d
    install -m644 ../NetworkManager.conf "$pkgdir/etc/NetworkManager/"
    install -Dm644 ../20-connectivity.conf \
    "$pkgdir/usr/lib/NetworkManager/conf.d/20-connectivity.conf"

    ### rm libnm

    cd ../libnm
    rm -rv "$pkgdir"/usr/include/libnm
    rm -rv  "$pkgdir"/usr/lib/girepository-1.0/NM-*
    rm -rv  "$pkgdir"/usr/lib/libnm.* usr/lib
    rm -rv  "$pkgdir"/usr/lib/pkgconfig/libnm.pc
    rm -rv  "$pkgdir"/usr/share/gir-1.0/NM-*
    rm -rv  "$pkgdir"/usr/share/gtk-doc/html/libnm
    rm -rv  "$pkgdir"/usr/share/vala/vapi/libnm.*

    ### rm libnm-glib

    cd ../libnm-glib
    rm -rv  "$pkgdir"/usr/include/*
    rm -rv  "$pkgdir"/usr/lib/girepository-1.0/*
    rm -rv  "$pkgdir"/usr/lib/libnm-*
    rm -rv  "$pkgdir"/usr/lib/pkgconfig/*
    rm -rv  "$pkgdir"/usr/share/gir-1.0/*
    rm -rv  "$pkgdir"/usr/share/gtk-doc/html/libnm-*
    rm -rv  "$pkgdir"/usr/share/vala/vapi/*

    rmdir -p --ignore-fail-on-non-empty \
    "$pkgdir"/usr/include \
    "$pkgdir"/usr/lib/{girepository-1.0,pkgconfig} \
    "$pkgdir"/usr/share/{gir-1.0,vala/vapi}
}