Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

dbus-git: fixup rc file and PKGBUILD

  • Loading branch information...
commit a8cd4ccd3caaae965b6ae6433784f1ed416c59a5 1 parent 9d69445
@falconindy authored
Showing with 36 additions and 40 deletions.
  1. +17 −22 dbus-git/PKGBUILD
  2. +19 −18 dbus-git/dbus.rc
View
39 dbus-git/PKGBUILD
@@ -1,31 +1,30 @@
# Contributor: Dave Reisner <d@falconindy.com>
pkgname=dbus-git
-pkgver=20110213
+pkgver=20120630
pkgrel=1
pkgdesc="Freedesktop.org message bus system"
url="http://www.freedesktop.org/Software/dbus"
arch=('i686' 'x86_64')
license=('GPL' 'custom')
depends=('libx11' 'expat' 'coreutils' 'filesystem')
-makedepends=('git')
+makedepends=('git' 'xmlto')
provides=('dbus' 'dbus-core')
conflicts=('dbus' 'dbus-core')
-options=('!libtool' 'emptydirs')
+options=('!libtool')
install=dbus.install
source=('dbus.rc'
'30-dbus')
-md5sums=('08f93dd19cffd1b45ab05c1fd4efb560'
+md5sums=('f0364f3f5dc5f653bb05d39aa36e3264'
'd14e59575f04e55d21a04907b6fd9f3c')
_gitroot="git://anongit.freedesktop.org/git/dbus/dbus"
_gitname="dbus"
build() {
- cd "$srcdir"
msg "Connecting to GIT server...."
- if [ -d $_gitname ] ; then
+ if [[ -d $_gitname ]] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
@@ -41,41 +40,37 @@ build() {
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/lib/dbus-1.0 --with-dbus-user=81 \
+ --with-system-pid-file=/run/dbus.pid \
+ --with-system-socket=/run/dbus/system_bus_socket \
+ --with-console-auth-dir=/run/console/ \
--disable-verbose-mode --disable-static \
--enable-inotify --disable-dnotify \
- --disable-tests --disable-asserts
+ --disable-tests --disable-asserts \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system \
+ --enable-systemd \
+ --disable-developer
make
}
package() {
- cd "$srcdir/$_gitname-build"
+ cd "$_gitname-build"
make DESTDIR="$pkgdir" install-man
pushd tools
- install -m755 -d "$pkgdir/etc/X11/xinit/xinitrc.d"
- install -m755 "$srcdir/30-dbus" "$pkgdir/etc/X11/xinit/xinitrc.d/"
- install -d -m755 "$pkgdir/usr/share/licenses/dbus"
+ install -Dm755 "$srcdir/30-dbus" "$pkgdir/etc/X11/xinit/xinitrc.d/30-dbus"
popd
make DESTDIR="$pkgdir" install
- install -Dm644 COPYING "$pkgdir/usr/share/licenses/dbus/COPYING"
-
- install -o 81 -g 81 -dm755 "$pkgdir/var/run/dbus"
install -Dm755 "$srcdir/dbus.rc" "$pkgdir/etc/rc.d/dbus"
+ rm -r "$pkgdir/var/run"
+
#Fix configuration file
sed -i -e 's|<user>81</user>|<user>dbus</user>|' "$pkgdir/etc/dbus-1/system.conf"
- #install .keep files so pacman doesn't delete empty dirs
- touch "$pkgdir/usr/share/dbus-1/services/.keep"
- touch "$pkgdir/usr/share/dbus-1/system-services/.keep"
- touch "$pkgdir/etc/dbus-1/session.d/.keep"
- touch "$pkgdir/etc/dbus-1/system.d/.keep"
-
- install -dm755 "$pkgdir/usr/share/licenses/dbus-core"
- install -Dm644 COPYING "$pkgdir/usr/share/licenses/dbus-core/COPYING"
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/dbus/COPYING"
}
View
37 dbus-git/dbus.rc
@@ -4,18 +4,24 @@
. /etc/rc.conf
. /etc/rc.d/functions
-case "$1" in
+reload_dbus() {
+ [[ -f /run/dbus/pid ]] || return 1
+
+ dbus-send \
+ --system \
+ --type=method_call \
+ --dest=org.freedesktop.DBus \
+ / org.freedesktop.DBus.ReloadConfig
+}
+
+case $1 in
start)
stat_busy "Starting D-BUS system messagebus"
- if [ ! -x /var/run/dbus ] ; then
- install -m755 -g 81 -o 81 -d /var/run/dbus
- fi
- if [ -x /usr/bin/dbus-uuidgen ] ; then
- /usr/bin/dbus-uuidgen --ensure
+ if [[ ! -d /run/dbus ]] ; then
+ install -m755 -g 81 -o 81 -d /run/dbus
fi
- /usr/bin/dbus-daemon --system
- if [ $? -gt 0 ]; then
+ if ! dbus-daemon --system; then
stat_fail
else
add_daemon dbus
@@ -24,27 +30,22 @@ case "$1" in
;;
stop)
stat_busy "Stopping D-BUS system messagebus"
- [ -f /var/run/dbus.pid ] && kill `cat /var/run/dbus.pid` >/dev/null 2>&1
- if [ $? -gt 0 ]; then
+ if ! { [[ -f /run/dbus/pid ]] && kill $(</run/dbus/pid); }; then
stat_fail
else
- rm -f /var/run/dbus.pid
+ rm -f /run/dbus/pid
rm_daemon dbus
stat_done
fi
;;
restart)
$0 stop
- sleep 1
+ sleep 1
$0 start
;;
reload)
stat_busy "Reloading D-BUS configuration"
- [ -f /var/run/dbus.pid ] && /usr/bin/dbus-send \
- --system --type=method_call \
- --dest=org.freedesktop.DBus \
- / org.freedesktop.DBus.ReloadConfig
- if [ $? -gt 0 ]; then
+ if ! reload_dbus; then
stat_fail
else
stat_done
@@ -52,6 +53,6 @@ case "$1" in
;;
*)
echo "usage: $0 {start|stop|restart|reload}"
- ;;
+ ;;
esac
exit 0

0 comments on commit a8cd4cc

Please sign in to comment.
Something went wrong with that request. Please try again.