#!/bin/sh
/usr/lib/libgphoto2/print-usb-usermap > /etc/hotplug/usb/usbcam.usermap
cat /usr/doc/libgphoto2-*/linux-hotplug/usbcam.group \
  | sed 's/GROUP=camera/GROUP=users/' \
  > /etc/hotplug/usb/usbcam
chmod +x /etc/hotplug/usb/usbcam
( cd usr/lib ; rm -rf libgphoto2_port.so.0 )
( cd usr/lib ; ln -sf libgphoto2_port.so.0.5.1 libgphoto2_port.so.0 )
( cd usr/lib ; rm -rf libgphoto2_port.so )
( cd usr/lib ; ln -sf libgphoto2_port.so.0.5.1 libgphoto2_port.so )
( cd usr/lib ; rm -rf libgphoto2.so.2 )
( cd usr/lib ; ln -sf libgphoto2.so.2.0.3 libgphoto2.so.2 )
( cd usr/lib ; rm -rf libgphoto2.so )
( cd usr/lib ; ln -sf libgphoto2.so.2.0.3 libgphoto2.so )
