# This has to assume the use of upgradepkg to work.
# Ever wondered why we install new packages twice?
# Here's an example:
if [ -d etc/X11/xkb/symbols/pc ]; then
  mv etc/X11/xkb etc/X11/xkb.old.bak.$$
  mkdir -p etc/X11/xkb/rules etc/X11/xkb
fi
( cd etc/X11 ; rm -rf xkb )
( cd etc/X11 ; ln -sf ../../usr/share/X11/xkb xkb )
( cd usr/man/man7 ; rm -rf xkeyboard-config.7.gz )
( cd usr/man/man7 ; ln -sf xkeyboard-config-2.7.gz xkeyboard-config.7.gz )
( cd usr/share/X11 ; rm -rf xkb )
( cd usr/share/X11 ; ln -sf /usr/share/xkeyboard-config-2 xkb )
( cd usr/share/pkgconfig ; rm -rf xkeyboard-config.pc )
( cd usr/share/pkgconfig ; ln -sf xkeyboard-config-2.pc xkeyboard-config.pc )
( cd usr/share/xkeyboard-config-2/rules ; rm -rf xorg )
( cd usr/share/xkeyboard-config-2/rules ; ln -sf base xorg )
( cd usr/share/xkeyboard-config-2/rules ; rm -rf xorg.lst )
( cd usr/share/xkeyboard-config-2/rules ; ln -sf base.lst xorg.lst )
( cd usr/share/xkeyboard-config-2/rules ; rm -rf xorg.xml )
( cd usr/share/xkeyboard-config-2/rules ; ln -sf base.xml xorg.xml )
