aboutsummaryrefslogtreecommitdiffstats
path: root/main/dbus/APKBUILD
blob: bd700474689c0773784b10adb14884fb6ce82c18 (plain) (blame)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dbus
pkgver=1.12.20
pkgrel=4
pkgdesc="Freedesktop.org message bus system"
url="https://www.freedesktop.org/Software/dbus"
arch="all"
license="AFL-2.1 OR GPL-2.0-or-later"
depends_dev="util-linux-dev"
makedepends="$depends_dev
	autoconf
	autoconf-archive
	automake
	expat-dev
	glib-dev
	libsm-dev
	libtool
	libx11-dev
	xmlto
	"
checkdepends="xvfb-run"
pkggroups="messagebus"
install="$pkgname.pre-install $pkgname.post-install"
triggers="$pkgname.trigger=/usr/share/dbus-1/system.d"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-x11 $pkgname-openrc"
source="https://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.gz
	0001-_dbus_generate_random_bytes-use-getrandom-2.patch
	avoid-opendir-between-fork-exec.patch
	$pkgname.initd
	$pkgname.confd
	"
options="!check"  # introduces circular dependency with xorg-server (xvfb-run -> xvfb)

# secfixes:
#   1.12.18-r0:
#     - CVE-2020-12049
#   1.12.16-r0:
#     - CVE-2019-12749

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-xml=expat \
		--with-dbus-user=messagebus \
		--with-system-pid-file=/run/dbus/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() {
	xvfb-run make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/lib/systemd

	install -Dm755 "$srcdir"/dbus.initd "$pkgdir"/etc/init.d/dbus
	install -Dm644 "$srcdir"/dbus.confd "$pkgdir"/etc/conf.d/dbus
}

libs() {
	pkgdesc="D-BUS access libraries"
	replaces="dbus"

	amove usr/lib/lib*.so.*
}

x11() {
	pkgdesc="X11 add-ons for D-BUS"
	depends="dbus=$pkgver-r$pkgrel"

	amove usr/bin/dbus-launch
}

sha512sums="
0964683bc6859374cc94e42e1ec0cdb542cca67971c205fcba4352500b6c0891665b0718e7d85eb060c81cb82e3346c313892bc02384da300ddd306c7eef0056  dbus-1.12.20.tar.gz
3db35499361e84d8e2469b88b033f49813b179188ac25f1841a989988c352af398a56dfd94383813626c6dfd032194f7a9fcdba001ccc3e005e7cd22dae7a7ed  0001-_dbus_generate_random_bytes-use-getrandom-2.patch
cdd01f51882be4f388515441237aa6318888db6e88a4d980bafbf9b790945e4d959c6633d6d002274c0a617ac919f9355ba628c9b502b355f73fed602f997791  avoid-opendir-between-fork-exec.patch
0db5c0804b5aa19c8d7e517b1c6d11b9b52d96477d4d26769c01a31765491ff12897b5634455ee57d978ea30e2d71c5df5ed3eecd5435983d8ab1128ff516315  dbus.initd
3f063efa672a900ed04bc7224ba31b3ced91bb98ae096a3ce12552a0b6e2c38ddb445edb4876518f9be4140a5d901dc62080e95aab4346d89dbf329ebec33cb3  dbus.confd
"