summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/dbus-openrc/30-dbus.sh6
-rw-r--r--pcr/dbus-openrc/PKGBUILD79
-rw-r--r--pcr/dbus-openrc/dbus.install21
3 files changed, 106 insertions, 0 deletions
diff --git a/pcr/dbus-openrc/30-dbus.sh b/pcr/dbus-openrc/30-dbus.sh
new file mode 100644
index 000000000..96a51828a
--- /dev/null
+++ b/pcr/dbus-openrc/30-dbus.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# launches a session dbus instance
+if [ -z "${DBUS_SESSION_BUS_ADDRESS-}" ] && type dbus-launch >/dev/null; then
+ eval $(dbus-launch --sh-syntax --exit-with-session)
+fi
diff --git a/pcr/dbus-openrc/PKGBUILD b/pcr/dbus-openrc/PKGBUILD
new file mode 100644
index 000000000..76176800d
--- /dev/null
+++ b/pcr/dbus-openrc/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer (Manjaro): Alexey D. <lq07829icatm@rambler.ru>
+# Contributor (Manjaro): Jan de Groot <jgc@archlinux.org>
+# Contributor (Manjaro): Link Dupont <link@subpop.net>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=dbus
+_gentoo_uri="https://raw.githubusercontent.com/gentoo/gentoo/master/sys-apps/dbus/files"
+
+pkgname=dbus-openrc
+pkgver=1.10.0
+pkgrel=3
+pkgdesc="Freedesktop.org message bus system"
+url="http://www.freedesktop.org/Software/dbus"
+arch=('i686' 'x86_64' 'armv7h')
+license=('GPL' 'custom')
+groups=('openrc-base' 'openrc-desktop')
+depends=('expat' "libdbus>=${pkgver}" 'openrc')
+makedepends=('libx11' 'xmlto' 'docbook-xsl' 'udev')
+optdepends=('libx11: dbus-launch support'
+ 'dbus-openrc: dbus openrc initscript')
+provides=('dbus-core' "dbus=${pkgver}")
+conflicts=('dbus-core' 'dbus'
+ 'systemd-sysvcompat')
+#replaces=('dbus-core' 'dbus')
+install=dbus.install
+source=("http://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.gz" #{,.asc}
+ "dbus.initd::${_gentoo_uri}/dbus.initd"
+ '30-dbus.sh')
+sha256sums=('1dfb9745fb992f1ccd43c920490de8caddf6726a6222e8b803be6098293f924b'
+ '31281696ad3920da14fbb03d983131361665567c2d06001dbf829dc159d48375'
+ 'dc1ce6d38674bad7a48ad1911576f8bbb3819f1019126fb1ef7c3cfad16bb02a')
+
+build() {
+ cd $_pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/dbus-1.0 \
+ --with-dbus-user=dbus \
+ --with-system-pid-file=/run/dbus/pid \
+ --with-system-socket=/run/dbus/system_bus_socket \
+ --with-console-auth-dir=/run/console/ \
+ --enable-inotify \
+ --disable-verbose-mode \
+ --disable-static \
+ --disable-tests \
+ --disable-asserts \
+ --disable-systemd \
+ --enable-user-session
+
+ make
+}
+_inst_initd(){
+ install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1
+
+ sed -e 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' \
+ -e 's|/var/run|/run|g' \
+ -i ${pkgdir}/etc/init.d/$1
+}
+
+package(){
+ cd $_pkgname-$pkgver
+
+ # Disable installation of libdbus
+ sed -i -e 's/^SUBDIRS = dbus/SUBDIRS =/' Makefile
+
+ make DESTDIR="$pkgdir" install
+
+ rm -rf "${pkgdir}/var/run"
+ rm -rf "${pkgdir}/usr/lib/pkgconfig"
+
+ install -Dm755 ../30-dbus.sh "$pkgdir/etc/X11/xinit/xinitrc.d/30-dbus"
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/dbus/COPYING"
+
+ _inst_initd 'dbus'
+
+ sed -e 's|dbus.pid|dbus/pid|g' -i "${pkgdir}/etc/init.d/dbus"
+}
diff --git a/pcr/dbus-openrc/dbus.install b/pcr/dbus-openrc/dbus.install
new file mode 100644
index 000000000..4b8f8e634
--- /dev/null
+++ b/pcr/dbus-openrc/dbus.install
@@ -0,0 +1,21 @@
+_svc="dbus"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+ # Make sure new rc script can shutdown running dbus
+ if [ -f run/dbus.pid -a -d run/dbus ]; then
+ mv run/dbus.pid run/dbus/pid
+ fi
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+