# gphoto2
# =======
# libgphoto2 is the guts that does all of the work. gphoto2 is the
# commandline interface to the library. gtkam is GUI for the library.
# Run this to create directories for source and tarballs:
mkdir -p -m 0700 ~/installed/gphoto ~/src/gphoto
cd
test -f installed/gphoto/libgphoto2-2.2.1.tar.gz &&
mv installed/gphoto/libgphoto2-2.2.1.tar.gz .
test ! -f libgphoto2-2.2.1.tar.gz &&
wget http://download.sf.net/gphoto/libgphoto2-2.2.1.tar.gz
cd src/gphoto
find -maxdepth 1 -type d -name "libgphoto2-*" -exec rm -r {} \;
tar xzvf ~/libgphoto2-2.2.1.tar.gz
cd libgphoto2-2.2.1
test $UID = 0 && chown -R root:root .
chmod -R u+w .
# make will fail unable to find some files (unless libgphoto is already
# installed), so create symlinks to where it wants them to be
( cd libgphoto2
ln -s . gphoto2
ln -s ../libgphoto2_port/libgphoto2_port/gphoto2-port-log.h )
## I had to open up libgphoto2_port/disk/disk.c and change
## dbus_connection_disconnect to dbus_connection_close
## to avoid this error with gphoto2 (which is below):
# gphoto2: symbol lookup error:
# /usr/local/lib/libgphoto2_port/0.6.1/disk.so:
# undefined symbol: dbus_connection_disconnect
## I have D-Bus 1.0.1 installed, this may not be necessary with older
## versions.
# For my own cutting and pasting convenience :-), this is the configure line
# that I used last time:
# ./configure --with-drivers=ptp2,canon --disable-nls
./configure --disable-nls
make
# Become root to install it
su
( cd /usr/local/lib ; rm -f libgphoto2.* libgphoto2_port.* )
make install
ldconfig
chown -R $USER .
# Create a 'camera' group, add user 'jason' to it:
getent group | grep "^camera:" > /dev/null 2>&1 || groupadd camera
gpasswd -a jason camera
# If you use hotplug:
/usr/local/lib/libgphoto2/print-camera-list usb-usermap > \
/etc/hotplug/usb/usbcam.usermap
# Now copy a hotplug script in place. If you named the group anything other
# than 'camera' above, modify the script to use that group name.
cp packaging/linux-hotplug/usbcam.group /etc/hotplug/usb/usbcam
chmod +x /etc/hotplug/usb/usbcam
# If you use udev (which requires the hotplug part above too):
/usr/local/lib/libgphoto2/print-camera-list udev-rules > \
/etc/udev/rules.d/libgphoto2.rules
# If you have HAL installed:
/usr/local/lib/libgphoto2/print-camera-list hal-fdi \
/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2.fdi
/usr/local/lib/libgphoto2/print-camera-list hal-fdi-device \
/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2-device.fdi
# Become yourself again
exit
cd
rm -f installed/gphoto/libgphoto2-*.tar.*
mv libgphoto2-2.2.1.tar.gz installed/gphoto/
# cdk 5.0-20060507
# ================
# This is optional. It's used by gphoto (the commandline util below), and I
# don't know of anything else that uses it, otherwise I'd add a howto for it
# by itself. It's a library of curses widgets.
# Prerequisites (beyond those listed above):
# ncurses
cd
test -f installed/gphoto/cdk-5.0-20060507.tgz &&
mv installed/gphoto/cdk-5.0-20060507.tgz .
test ! -f cdk-5.0-20060507.tgz &&
wget ftp://invisible-island.net/cdk/cdk-5.0-20060507.tgz
cd src/gphoto
find -maxdepth 1 -type d -name "cdk-*" -exec rm -r {} \;
tar xzvf ~/cdk-5.0-20060507.tgz
cd cdk-5.0-20060507
test $UID = 0 && chown -R root:root .
./configure
make
su -c "make install"
cd
rm -f installed/gphoto/cdk-*.tgz
mv cdk-5.0-20060507.tgz installed/gphoto/
cd
test -f installed/gphoto/gtkam-0.1.13.tar.bz2 &&
mv installed/gphoto/gtkam-0.1.13.tar.bz2 .
test ! -f gtkam-0.1.13.tar.bz2 &&
wget http://download.sf.net/gphoto/gtkam-0.1.13.tar.bz2
cd src/gphoto
find -maxdepth 1 -type d -name "gtkam-*" -exec rm -r {} \;
tar xjvf ~/gtkam-0.1.13.tar.bz2
cd gtkam-0.1.13
test $UID = 0 && chown -R root:root .
./configure --disable-nls
# If you used --disable-nls, apply this patch:
wget -nc http://englanders.cc/pub/linux/patches/gtkam-0.1.13-nls.patch &&
patch -p0 < gtkam-0.1.13-nls.patch
make
su -c "make install"
cd
rm -f installed/gphoto/gtkam-*.tar.*
mv gtkam-0.1.13.tar.bz2 installed/gphoto/
# /usr/local/share/pixmaps/gtkam.png can be used as a desktop icon