summaryrefslogtreecommitdiffstats
path: root/package/dbus
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 03:45:06 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 03:45:06 +0000
commitceb285976563f6ba2c87a17ff92f1b1490df698a (patch)
treeeafc44ab6709d56089c5be0e6e38d8011c280e60 /package/dbus
parentee8f2133a57111dd36a6bd667a945dc04a4e419d (diff)
downloadbuildroot-novena-ceb285976563f6ba2c87a17ff92f1b1490df698a.tar.gz
buildroot-novena-ceb285976563f6ba2c87a17ff92f1b1490df698a.zip
Add packages for D-Bus and G-Lib interface library too.
Diffstat (limited to 'package/dbus')
-rw-r--r--package/dbus/Config.in8
-rw-r--r--package/dbus/dbus.mk100
-rwxr-xr-xpackage/dbus/init-dbus76
3 files changed, 184 insertions, 0 deletions
diff --git a/package/dbus/Config.in b/package/dbus/Config.in
new file mode 100644
index 000000000..7d7640c79
--- /dev/null
+++ b/package/dbus/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_DBUS
+ bool "dbus"
+ default n
+ select BR2_PACKAGE_EXPAT
+ help
+ The D-Bus message bus system.
+
+ http://www.freedesktop.org/wiki/Software/dbus
diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk
new file mode 100644
index 000000000..32629fd6c
--- /dev/null
+++ b/package/dbus/dbus.mk
@@ -0,0 +1,100 @@
+#############################################################
+#
+# dbus
+#
+#############################################################
+DBUS_VER:=1.0.0
+DBUS_SOURCE:=dbus-$(DBUS_VER).tar.gz
+DBUS_SITE:=http://dbus.freedesktop.org/releases/dbus/
+DBUS_DIR:=$(BUILD_DIR)/dbus-$(DBUS_VER)
+DBUS_CAT:=$(ZCAT)
+DBUS_BINARY:=bus/dbus-daemon
+DBUS_TARGET_BINARY:=usr/bin/dbus-daemon
+
+$(DL_DIR)/$(DBUS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(DBUS_SITE)/$(DBUS_SOURCE)
+
+dbus-source: $(DL_DIR)/$(DBUS_SOURCE)
+
+$(DBUS_DIR)/.unpacked: $(DL_DIR)/$(DBUS_SOURCE)
+ $(DBUS_CAT) $(DL_DIR)/$(DBUS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(DBUS_DIR)/.unpacked
+
+$(DBUS_DIR)/.configured: $(DBUS_DIR)/.unpacked
+ (cd $(DBUS_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ac_cv_have_abstract_sockets=yes \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --localstatedir=/var \
+ --program-prefix="" \
+ --sysconfdir=/etc \
+ --with-dbus-user=dbus \
+ --disable-tests \
+ --disable-asserts \
+ --enable-abstract-sockets \
+ --disable-selinux \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-static \
+ --enable-dnotify \
+ --without-x \
+ --without-xml \
+ --with-system-socket=/var/run/dbus/system_bus_socket \
+ --with-system-pid-file=/var/run/messagebus.pid \
+ );
+ touch $(DBUS_DIR)/.configured
+
+$(DBUS_DIR)/$(DBUS_BINARY): $(DBUS_DIR)/.configured
+ $(MAKE) DBUS_BUS_LIBS="$(STAGING_DIR)/lib/libexpat.so" -C $(DBUS_DIR) all
+
+$(STAGING_DIR)/usr/lib/libdbus-1.so: $(DBUS_DIR)/$(DBUS_BINARY)
+ $(MAKE) DESTDIR=$(STAGING_DIR) -C $(DBUS_DIR)/dbus install
+
+$(TARGET_DIR)/$(DBUS_TARGET_BINARY): $(STAGING_DIR)/usr/lib/libdbus-1.so
+ mkdir $(TARGET_DIR)/var/run/dbus
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(DBUS_DIR)/dbus install
+ rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/dbus-1.0
+ rm -f $(TARGET_DIR)/usr/lib/libdbus-1.la
+ rm -f $(TARGET_DIR)/usr/lib/libdbus-1.so
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libdbus-1.so.3.2.0
+ $(MAKE) DESTDIR=$(TARGET_DIR) initddir=/etc/init.d -C $(DBUS_DIR)/bus install
+ $(INSTALL) -m 0755 -D package/dbus/init-dbus $(TARGET_DIR)/etc/init.d/S97messagebus
+ rm -f $(TARGET_DIR)/etc/init.d/messagebus
+ rm -rf $(TARGET_DIR)/usr/man
+ rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
+ rm -rf $(TARGET_DIR)/etc/rc.d
+
+dbus: uclibc expat $(TARGET_DIR)/$(DBUS_TARGET_BINARY)
+
+dbus-clean:
+ rm -f $(TARGET_DIR)/etc/dbus-1/session.conf
+ rm -f $(TARGET_DIR)/etc/dbus-1/system.conf
+ rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/etc/dbus-1/system.d
+ rm -f $(TARGET_DIR)/etc/init.d/S97messagebus
+ rm -f $(TARGET_DIR)/usr/lib/libdbus-1.so*
+ rm -f $(TARGET_DIR)/usr/bin/dbus-daemon
+ rm -rf $(TARGET_DIR)/tmp/dbus
+ rm -f $(STAGING_DIR)/usr/lib/libdbus-1.*
+ rm -rf $(STAGING_DIR)/usr/lib/dbus-1.0
+ rm -rf $(STAGING_DIR)/usr/include/dbus-1.0
+ rmdir --ignore-fail-on-non-empty $(STAGING_DIR)/usr/include
+ -$(MAKE) -C $(DBUS_DIR) clean
+
+dbus-dirclean:
+ rm -rf $(DBUS_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_DBUS)),y)
+TARGETS+=dbus
+endif
diff --git a/package/dbus/init-dbus b/package/dbus/init-dbus
new file mode 100755
index 000000000..bddb3b9dd
--- /dev/null
+++ b/package/dbus/init-dbus
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# messagebus: The D-BUS systemwide message bus
+#
+# chkconfig: 345 97 03
+# description: This is a daemon which broadcasts notifications of system events \
+# and other messages. See http://www.freedesktop.org/software/dbus/
+#
+# processname: dbus-daemon
+# pidfile: /var/run/messagebus.pid
+#
+
+# Sanity checks.
+[ -x /usr/bin/dbus-daemon ] || exit 0
+
+# Create needed directories.
+[ -d /var/run/dbus ] || mkdir -p /var/run/dbus
+[ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
+
+RETVAL=0
+
+start() {
+ echo -n "Starting system message bus: "
+
+ dbus-daemon --system
+ RETVAL=$?
+ echo "done"
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon
+}
+
+stop() {
+ echo -n "Stopping system message bus: "
+
+ ## we don't want to kill all the per-user $processname, we want
+ ## to use the pid file *only*; because we use the fake nonexistent
+ ## program name "$servicename" that should be safe-ish
+ killall dbus-daemon
+ RETVAL=$?
+ echo "done"
+ if [ $RETVAL -eq 0 ]; then
+ rm -f /var/lock/subsys/dbus-daemon
+ rm -f /var/run/messagebus.pid
+ fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $processname
+ RETVAL=$?
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/$servicename ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ echo "Message bus can't reload its configuration, you have to restart it"
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+ ;;
+esac
+exit $RETVAL