aboutsummaryrefslogtreecommitdiffstats
path: root/main/dbus/APKBUILD
blob: d0f5d58aebc2da7ab31a99bfa0c7027dd06b9e55 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dbus
pkgver=1.12.16
pkgrel=2
pkgdesc="Freedesktop.org message bus system"
options="!check" # Introduces circular dependency with xorg-server (xvfb-run -> xvfb)
url="https://www.freedesktop.org/Software/dbus"
pkggroups="messagebus"
arch="all"
license="AFL-2.1 OR GPL-2.0-or-later"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-x11 $pkgname-openrc"
triggers="$pkgname.trigger=/etc/dbus-1/system.d"
depends_dev="util-linux-dev"
makedepends="$depends_dev expat-dev libx11-dev autoconf automake libtool xmlto
	libsm-dev glib-dev"
checkdepends="xvfb-run"
install="$pkgname.pre-install"
source="https://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.gz
	$pkgname.initd
	"

# secfixes:
#   1.12.16-r0:
#   - CVE-2019-12749

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-xml=expat \
		--with-dbus-user=messagebus \
		--with-system-pid-file=/var/run/dbus.pid \
		--disable-verbose-mode \
		--disable-static \
		--enable-inotify \
		--disable-dnotify \
		--enable-modular-tests=yes \
		--disable-asserts \
		--enable-user-session \
		--enable-xml-docs \
		--with-session-socket-dir=/tmp \
		--with-x
	make
}

check() {
	cd "$builddir"
	xvfb-run make check
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make -j1 DESTDIR="$pkgdir" install
	install -Dm755 "$srcdir"/dbus.initd "$pkgdir"/etc/init.d/dbus
	rm -rf "$pkgdir"/usr/lib/systemd
}

libs() {
	pkgdesc="D-BUS access libraries"
	replaces="dbus"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/
}

x11() {
	pkgdesc="X11 add-ons for D-BUS"
	depends="dbus=$pkgver-r$pkgrel"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/dbus-launch "$subpkgdir"/usr/bin/
}

sha512sums="27ae805170e9515a8bb0fba5f29d414edc70e3b6b28b7b65bbea47035b8eafa9ac4820cdc92645be6035f6748f8aa45679e1ffc84ba74a64859a3056d318b9bb  dbus-1.12.16.tar.gz
4c6beba2382416e60a3adfa85ef843d90d93ca5f38c23f573e058ffca6d4fc3850d11d40938c74383bba61599569b7fdfb1fcf3b9d2f1463e6b2e2cc81097c84  dbus.initd"