aboutsummaryrefslogtreecommitdiffstats
path: root/testing/networkmanager/APKBUILD
blob: 24af10bb75937af59dc5eda4b280ebbf5863d389 (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=networkmanager
pkgver=1.0.0
_ver=1.0
pkgrel=0
pkgdesc="network management tool"
url="http://projects.gnome.org/NetworkManager/"
arch="all"
license="GPL"
depends="dhcpcd iptables dbus"
depends_dev="dbus-glib-dev udev-dev libnl3-dev util-linux-dev linux-headers polkit-dev ppp-dev zlib-dev
		wireless-tools-dev nss-dev nspr-dev gobject-introspection-dev libndp-dev libmm-glib-dev
                modemmanager-dev newt-dev bluez-dev libsoup-dev libteam-dev rp-pppoe valgrind dnsmasq
                openresolv dhclient vala gtk-doc readline-dev"
makedepends="$depends_dev intltool ncurses-terminfo"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/$_ver/NetworkManager-$pkgver.tar.xz
	$pkgname.conf
	$pkgname.initd
	$pkgname.rules
	$pkgname.apk-post-msg
	new-fix-musl-headers.patch
	disable_set_hostname.patch
	"

_builddir="$srcdir"/NetworkManager-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	# Build fails without IPTOS_CLASS_CS6 defined (required by systemd) ###
        # http://cgit.openembedded.org/openembedded-core/commit/?id=7562021eef5b7585122c92db8b686808ebe7d85e
	# Remove systemd functionality. This also removes many: "error: redefinition of 'struct ethhdr'"
	local f= files=$(find src/dhcp-manager/systemd-dhcp -type f) # --without-systemd has no effect
	files="$files $(find src/dhcp-manager -maxdepth 1 -type f -name "*-systemd.*")"
	for f in $files; do # do NOT build --with-dbus-sys-dir=/etc/dbus-1 (nm service will crash)
		printf "" > $f
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-systemdsystemunitdir=no \
		--enable-more-warnings=yes \
 		--enable-ifupdown \
		--enable-concheck \
 		--with-dhcpcd=yes \
		--with-crypto=nss \
		--with-modem-manager-1 \
		--with-nmtui=yes \
		--with-wext=yes \
		--with-resolvconf=yes \
		--disable-wimax \
		|| return 1
	# ourLDFLAGS confuses the gir-scanner
	unset LDFLAGS
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	install -m755 -D "$srcdir"/networkmanager.initd \
		"$pkgdir"/etc/init.d/networkmanager || return 1

	rm "$pkgdir"/usr/lib/*.la \
		"$pkgdir"/usr/lib/NetworkManager/*.la \
		"$pkgdir"/usr/lib/pppd/*/nm-pppd-plugin.la || return 1

	mv "$pkgdir"/usr/lib/locale "$pkgdir"/usr/share/ || return 1

	install -m644 -D "$srcdir/$pkgname.conf" \
                "$pkgdir/etc/NetworkManager/NetworkManager.conf" || return 1
	# allow plugdev users to modify connections
	install -m644 -D "$srcdir/$pkgname.rules" \
                "$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules" || return 1
	mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname"
        install -m644 "$srcdir/$pkgname.apk-post-msg" "$pkgdir/usr/share/apk-tools/$pkgname/post-install-message" || return 1
}

md5sums="71cae8707a90fa92e28cafbc9262b548  NetworkManager-1.0.0.tar.xz
b722fa02f904a9c8ed0d2ec21cbfc588  networkmanager.conf
c1c4609f415d7288e223d8c99e2d52d3  networkmanager.initd
a39b4feaf1edecc057596be6d82ba634  networkmanager.rules
defcc48b47314560dd7bbf6c106dc803  networkmanager.apk-post-msg
eb52238b018c2ca9cd969facbf3e4a39  new-fix-musl-headers.patch
4f2c03bce7febd1eede0dc2c5f8b30d9  disable_set_hostname.patch"
sha256sums="3a66afec670c975edd9832e620b725a5f16ed267a1b9e1b2d51ef27250d85947  NetworkManager-1.0.0.tar.xz
cd2a4b0079c0726973c1cf226c4e1cb4f2d27d02c16e0e08af7e4d6b8770423c  networkmanager.conf
3a67ecb96fb34b36b8da93909066a2a355aaadef2e0dda6f2ae1004e2307dc53  networkmanager.initd
01f4b833c515e88c1963a0ee56ffbf70c59c5efc4dd59a5174498d2fabfc9362  networkmanager.rules
2602eb20b9340b32ce6a8956bcc643592441e467c5aa9ab2ae8941df286cf158  networkmanager.apk-post-msg
ea205946b52fca22b9ef8b1f3a4e89a69dca430201b5b0f441564d1659d9f295  new-fix-musl-headers.patch
6fc7bc258ac01c2d2578f5a29e7eee55b98bbf8f32dae6d28dede7d7ee5e5c4e  disable_set_hostname.patch"
sha512sums="7089496ce31bfdffe99c0f031b6326734d2e36b3bb9a2ed0ecbe3dad64bff0dc993b2e6bcac770b31bcfe634833bd8dbabc23d128356dbba8243a6d8fc489a5e  NetworkManager-1.0.0.tar.xz
a6e507260e2ceffad4cacb2b49a1d4f6b933e5ae8bc50c1bd56f828298c5dc8d9d17aa4be766faeacefbe3c6c0c748e4ef499a55bb5ee40f0f04bbf766fbbc82  networkmanager.conf
d312bcb4f0d99331e189494bcb9fb1262cf3356e904573f7417b4429a1b8de083b9a6d51605b88d17be14e47ce2e9a3f4ea6e444790c3ffeccfe1c1d3cdd73d9  networkmanager.initd
9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6  networkmanager.rules
8271652a8f0f6b6072a1b6e9fa9d8e2cda7e7f38a3b7449216022b5a1a4cdc32c1bb4c8f0332b8e858354aab3a841abc8d77b1fed4b7db723ef82d5dab06475b  networkmanager.apk-post-msg
18eff8eadcb8d47742a5c760c0c4a217d82749edc0060dc3b62e6aa0671f456de9d0c11b1669b302371410cd4036bf21aee468ed1d61e7a84afd3b694bc69984  new-fix-musl-headers.patch
cdc8c26720b983f8afb11ee08c87aab863522633d8dc08e8cea080ed8d94378b3534aedf09efc6e7481599cfede6122b5f6a86b0b45e0a8bb653f95d4c5beaf8  disable_set_hostname.patch"