#!/bin/sh

. config/options

$SCRIPTS/install expat

mkdir -p $INSTALL/usr/share/dbus-1/services
mkdir -p $INSTALL/usr/share/dbus-1/system-services

mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/bus/dbus-daemon $INSTALL/usr/bin
cp $PKG_BUILD/tools/.libs/dbus-uuidgen $INSTALL/usr/bin
cp $PKG_BUILD/tools/dbus-launch $INSTALL/usr/bin

mkdir -p $INSTALL/usr/lib
cp -PR $PKG_BUILD/dbus/.libs/libdbus-1.so* $INSTALL/usr/lib

mkdir -p $INSTALL/usr/lib/dbus-1.0
cp $PKG_BUILD/bus/dbus-daemon-launch-helper $INSTALL/usr/lib/dbus-1.0

mkdir -p $INSTALL/etc/dbus-1/event.d
mkdir -p $INSTALL/etc/dbus-1/system.d
mkdir -p $INSTALL/etc/dbus-1/session.d

cp $PKG_BUILD/bus/session.conf $INSTALL/etc/dbus-1
sed 's%<servicehelper>.*</servicehelper>%<servicehelper>/usr/lib/dbus-1.0/dbus-daemon-launch-helper</servicehelper>%' $PKG_BUILD/bus/system.conf > $INSTALL/etc/dbus-1/system.conf
