summaryrefslogtreecommitdiff
path: root/user/dbus
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-06 00:37:15 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-06 00:37:15 -0500
commitf5970c10016f26760c5afcdc8b164d4349179e20 (patch)
tree4403694d926149ce086512f1da30d8cd7c38bb24 /user/dbus
parentaaa6bc3b8dbec92ade35443d4053a94bd973b6c0 (diff)
downloadpackages-f5970c10016f26760c5afcdc8b164d4349179e20.tar.gz
packages-f5970c10016f26760c5afcdc8b164d4349179e20.tar.bz2
packages-f5970c10016f26760c5afcdc8b164d4349179e20.tar.xz
packages-f5970c10016f26760c5afcdc8b164d4349179e20.zip
user/dbus: take, bump, fix, split OpenRC, fix config, add pkgusers, ...
Diffstat (limited to 'user/dbus')
-rw-r--r--user/dbus/APKBUILD67
-rw-r--r--user/dbus/dbus.initd50
-rw-r--r--user/dbus/dbus.post-install3
-rw-r--r--user/dbus/dbus.pre-install6
-rw-r--r--user/dbus/dbus.trigger4
5 files changed, 130 insertions, 0 deletions
diff --git a/user/dbus/APKBUILD b/user/dbus/APKBUILD
new file mode 100644
index 000000000..543e1ef32
--- /dev/null
+++ b/user/dbus/APKBUILD
@@ -0,0 +1,67 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=dbus
+pkgver=1.12.8
+pkgrel=0
+pkgdesc="IPC/message bus system, allowing user applications to communicate"
+url="http://www.freedesktop.org/wiki/Software/dbus/"
+pkggroups="messagebus"
+pkgusers="messagebus"
+arch="all"
+options="!check" # Requires running X11 server.
+license="AFL-2.1 OR GPL-2.0+"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc
+ $pkgname-x11"
+triggers="$pkgname.trigger=/etc/dbus-1/system.d"
+depends=
+depends_dev="util-linux-dev"
+makedepends="$depends_dev expat-dev libx11-dev autoconf automake libtool xmlto
+ libsm-dev"
+install="$pkgname.pre-install $pkgname.post-install"
+source="http://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.gz
+ $pkgname.initd
+ "
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-dbus-user=messagebus \
+ --with-system-pid-file=/var/run/dbus.pid \
+ --disable-verbose-mode \
+ --disable-static \
+ --enable-inotify \
+ --disable-tests \
+ --disable-asserts \
+ --enable-user-session \
+ --enable-xml-docs \
+ --with-session-socket-dir=/tmp \
+ --with-x
+ make
+}
+
+package() {
+ cd "$builddir"
+ make -j1 DESTDIR="$pkgdir" install
+ install -Dm755 "$srcdir"/dbus.initd "$pkgdir"/etc/init.d/dbus
+}
+
+libs() {
+ pkgdesc="Libraries to communicate over D-Bus"
+ 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="8177898bf2db22e5c6abff0d9ffec8f248f0d155a83b7ae906c1ce3b61d289e7ba7bef9799102e6de3ca64198c7d293dccecf92c7e8b7403c1d9b1bb86e99ea3 dbus-1.12.8.tar.gz
+df74e7d6a4f76f777d356e94bd23422b17656aa51a5b2d3c655fcabb32c84f2f06b9f5cd8827920d51842f89e8c0d968a6e723315e4bf216e55711fcda9b0ee9 dbus.initd"
diff --git a/user/dbus/dbus.initd b/user/dbus/dbus.initd
new file mode 100644
index 000000000..9b7cdd430
--- /dev/null
+++ b/user/dbus/dbus.initd
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/files/dbus.initd,v 1.1 2011/11/05 13:56:10 ssuominen Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting D-BUS system messagebus"
+ /usr/bin/dbus-uuidgen --ensure=/etc/machine-id
+
+ # We need to test if /var/run/dbus exists, since script will fail if it does not
+ [ ! -e /var/run/dbus ] && mkdir /var/run/dbus
+
+ start-stop-daemon --start --pidfile /var/run/dbus.pid --exec /usr/bin/dbus-daemon -- --system
+ eend $?
+}
+
+stop() {
+ local retval
+
+ ebegin "Stopping D-BUS system messagebus"
+
+ start-stop-daemon --stop --pidfile /var/run/dbus.pid
+ retval=$?
+
+ eend ${retval}
+
+ [ -S /var/run/dbus/system_bus_socket ] && rm -f /var/run/dbus/system_bus_socket
+
+ return ${retval}
+}
+
+reload() {
+ local retval
+
+ ebegin "Reloading D-BUS messagebus config"
+
+ /usr/bin/dbus-send --print-reply --system --type=method_call \
+ --dest=org.freedesktop.DBus \
+ / org.freedesktop.DBus.ReloadConfig > /dev/null
+ retval=$?
+ eend ${retval}
+ return ${retval}
+}
diff --git a/user/dbus/dbus.post-install b/user/dbus/dbus.post-install
new file mode 100644
index 000000000..305297a48
--- /dev/null
+++ b/user/dbus/dbus.post-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec dbus-uuidgen --ensure
diff --git a/user/dbus/dbus.pre-install b/user/dbus/dbus.pre-install
new file mode 100644
index 000000000..889651721
--- /dev/null
+++ b/user/dbus/dbus.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S messagebus 2>/dev/null
+adduser -S -D -H -h /dev/null -s /sbin/nologin -G messagebus -g "D-Bus User" messagebus 2>/dev/null
+
+exit 0
diff --git a/user/dbus/dbus.trigger b/user/dbus/dbus.trigger
new file mode 100644
index 000000000..a537bd8df
--- /dev/null
+++ b/user/dbus/dbus.trigger
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+dbus-send --system --type=method_call --dest=org.freedesktop.DBus / \
+ org.freedesktop.DBUS.ReloadConfig >/dev/null 2>&1 || :