. ../_blfsset.sh
. ../Xorg/_xorgset.sh

KDE_PREFIX=/opt/kde

KDEDLD=$DLD/kde

if ! test -f /etc/profile.d/kde.sh; then
cat > /etc/profile.d/kde.sh << EOF
# Begin /etc/profile.d/kde.sh

KDE_PREFIX=/opt/kde
KDEDIR=$KDE_PREFIX

pathappend $KDE_PREFIX/bin             PATH
pathappend $KDE_PREFIX/lib/pkgconfig   PKG_CONFIG_PATH
pathappend $KDE_PREFIX/share/pkgconfig PKG_CONFIG_PATH
pathappend $KDE_PREFIX/share           XDG_DATA_DIRS
pathappend /etc/kde/xdg                XDG_CONFIG_DIRS

export KDE_PREFIX KDEDIR

# End /etc/profile.d/kde.sh
EOF
fi

if grep '/opt/kde/lib' /etc/ld.so.conf >/dev/null; then
echo Nothing >/dev/null
else
cat >> /etc/ld.so.conf << EOF
# Begin kde addition

/opt/kde/lib

# End kde addition
EOF
fi

install -d $KDE_PREFIX/share 
ln -svf /usr/share/dbus-1 $KDE_PREFIX/share \
	>/dev/null
ln -svf /usr/share/polkit-1 $KDE_PREFIX/share \
	>/dev/null

mkdir -pv /etc/dbus-1 &&
cat > /etc/dbus-1/system-local.conf << EOF
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <includedir>/etc/kde/dbus-1/system.d</includedir>

</busconfig>
EOF


