Difference between revisions of "Libgphoto2"

From CBLFS
Jump to navigationJump to search
Line 80: Line 80:
  
 
The following instructions explain how to change permissions to used libgphoto2 with libptp with no-root user.  
 
The following instructions explain how to change permissions to used libgphoto2 with libptp with no-root user.  
 
In console mode, plug your device you must have a line like this :
 
 
usb 2-1: new full speed USB device using uhci_hcd and address 4
 
  
 
In root :
 
In root :

Revision as of 12:51, 5 January 2007

Download Source: http://prdownloads.sourceforge.net/gphoto/libgphoto2-2.4.9.1.tar.bz2

Dependencies

Optional

Non-Multilib

Compile the package:

./configure --prefix=/usr &&
make all-local &&
make

Install the package

make install

Multilib

32Bit

Compile the package:

CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
USE_ARCH=32 ./configure --prefix=/usr &&
make all-local &&
make

Install the package

make install &&
mv -v /usr/bin/gphoto2-config{,-32} &&
mv -v /usr/bin/gphoto2-port-config{,-32}

N32

Compile the package:

CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
USE_ARCH=n32 ./configure --prefix=/usr --libdir=/usr/lib32 &&
make all-local &&
make

Install the package

make install &&
mv -v /usr/bin/gphoto2-config{,-n32} &&
mv -v /usr/bin/gphoto2-port-config{,-n32}

64Bit

Compile the package:

CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
USE_ARCH=64 ./configure --prefix=/usr --libdir=/usr/lib64 &&
make all-local &&
make

Install the package

make install &&
mv -v /usr/bin/gphoto2-config{,-64} &&
mv -v /usr/bin/gphoto2-port-config{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/gphoto2-config &&
ln -sfv multiarch_wrapper /usr/bin/gphoto2-port-config

Configuring libgphoto2 with libptp

The following instructions explain how to change permissions to used libgphoto2 with libptp with no-root user.

In root :

ptpcam --list-devices

You get something like this:

Listing devices...

bus/dev vendorID/prodID device model

2/4 0x040A/0x05BA C633 Zoom Digital Camera

After, create a udev rule file, with datas give by the ptpcam:

cat > /etc/udev/rules.d/92-libgphoto2.rules << "EOF"
# udev rules file for libgphoto2 devices

BUS=="usb", SYSFS{idVendor}=="040a", SYSFS{idProduct}=="05ba", MODE="0660", GROUP="camera"
EOF

Next, create a group named "camera" and add your user.