summaryrefslogtreecommitdiff
path: root/pcr/networkmanager-consolekit/PKGBUILD
blob: 62c09710f46f4b5b2dd87597b3f4e1aeb90d2915 (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
# Maintainer (Manjaro): artoo <artoo@manjaro.org>
# Contributor (Manjaro): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor (Manjaro): Jan de Groot <jgc@archlinxu.org>
# Contributor (Manjaro): Wael Nasreddine <gandalf@siemens-mobiles.org>
# Contributor (Manjaro): Tor Krill <tor@krill.nu>
# Contributor (Manjaro): Will Rea <sillywilly@gmail.com>
# Contributor (Manjaro): Valentine Sinitsyn <e_val@inbox.ru>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_pppver=2.4.7

pkgname=networkmanager-consolekit
pkgver=1.4.1dev+33+gc87b89b
pkgrel=1
pkgdesc="Network Management daemon"
arch=('i686' 'x86_64' 'armv7h')
license=('GPL2' 'LGPL2.1')
url="http://www.gnome.org/projects/NetworkManager/"
provides=('networkmanager')
conflicts=('networkmanager')
makedepends=('intltool' 'dhclient' 'iptables' 'gobject-introspection' 'gtk-doc'
			"ppp=$_pppver" 'modemmanager' 'dbus-glib' 'iproute2' 'nss'
			 'polkit-consolekit' 'wpa_supplicant' 'libsoup' 'eudev-systemd' 'libgudev' 'libmm-glib'
			 'rp-pppoe' 'libnewt' 'libndp' 'libteam' 'vala' 'perl-yaml' 'python-gobject' 'git')
checkdepends=('libx11' 'python-dbus' 'eudev-systemd')
depends=('libnm-glib' 'iproute2' 'polkit-consolekit' 'wpa_supplicant' 'libsoup' 'libmm-glib' 'libnewt' 'libndp' 'libteam' 'consolekit' 'eudev')
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')
backup=('etc/NetworkManager/NetworkManager.conf')

_commit=c87b89bf8f7d0e45df08e84503eb16f5ef2ce3c6
# "https://download.gnome.org/sources/NetworkManager/${pkgver:0:3}/NetworkManager-$pkgver.tar.xz"
source=("git://anongit.freedesktop.org/NetworkManager/NetworkManager#commit=$_commit"
        'NetworkManager.conf'
        '01-org.freedesktop.NetworkManager.settings.modify.system.rules'
        '50-org.freedesktop.NetworkManager.rules')
sha256sums=('SKIP'
            '452e4f77c1de92b1e08f6f58674a6c52a2b2d65b7deb0ba436e9afa91ee15103'
            '4b815f43de58379e68653d890f529485aec4d2f83f11d050b08b31489d2267c2'
            '02d9f7d836d297d6ddf39482d86a8573b3e41735b408aa2cd6df22048ec5f6c4')

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

prepare() {
  cd NetworkManager #-$pkgver

  2to3 -w libnm src tools

  NOCONFIGURE=1 ./autogen.sh
}

build() {
	cd NetworkManager #-$pkgver
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--sbindir=/usr/bin \
		--libexecdir=/usr/lib/networkmanager \
		--with-crypto=nss \
		--with-dhclient=/usr/bin/dhclient \
		--without-dhcpcd \
		--with-dnsmasq=/usr/bin/dnsmasq \
		--with-iptables=/usr/bin/iptables \
		--with-systemdsystemunitdir=/usr/lib/systemd/system \
		--with-udev-dir=/usr/lib/udev \
		--with-resolvconf=/usr/bin/resolvconf \
		--with-pppd=/usr/bin/pppd \
		--with-pppd-plugin-dir=/usr/lib/pppd/$_pppver \
		--with-pppoe=/usr/bin/pppoe \
		--with-kernel-firmware-dir=/usr/lib/firmware \
		--with-session-tracking=ck \
		--with-modem-manager-1 \
		--disable-static \
		--enable-more-warnings=no \
		--disable-wimax \
		--enable-modify-system \
		--enable-doc \
		--enable-gtk-doc

	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/      func_append compile_command " -Wl,-O1,--as-needed"\n      func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool

	make
}

check() {
	cd NetworkManager #-$pkgver
	make -k check
}

package() {
	cd NetworkManager #-$pkgver
	make DESTDIR="$pkgdir" install
	make DESTDIR="$pkgdir" -C libnm uninstall
	make DESTDIR="$pkgdir" -C libnm-glib uninstall
	make DESTDIR="$pkgdir" -C libnm-util uninstall
	make DESTDIR="$pkgdir" -C vapi uninstall

	# Some stuff to move is left over
	rm -r "$pkgdir/usr/include"
	rm -r "$pkgdir/usr/lib/pkgconfig"

	install -m644 ../NetworkManager.conf "$pkgdir/etc/NetworkManager/"
	install -m755 -d "$pkgdir/etc/NetworkManager/dnsmasq.d"

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

    	install -dm 750 -o polkitd "${pkgdir}"/usr/share/polkit-1/rules.d

	install -m 644 ${srcdir}/01-org.freedesktop.NetworkManager.settings.modify.system.rules $pkgdir/usr/share/polkit-1/rules.d/

	install -m 644 ${srcdir}/50-org.freedesktop.NetworkManager.rules $pkgdir/usr/share/polkit-1/rules.d/

}