Libgphoto2: Difference between revisions
From CBLFS
Jump to navigationJump to search
No edit summary |
|||
| (14 intermediate revisions by 4 users not shown) | |||
| Line 2: | Line 2: | ||
|- | |- | ||
!Download Source: | !Download Source: | ||
| http://prdownloads.sourceforge.net/gphoto/libgphoto2- | | http://prdownloads.sourceforge.net/gphoto/libgphoto2-{{Libgphoto2-Version}}.tar.bz2 | ||
|} | |} | ||
---- | ---- | ||
{{Package-Introduction|libgphoto2 is the core library designed to allow access to digital camera by external programs.|http://gphoto.sourceforge.net/proj/libgphoto2/}} | |||
== Dependencies == | == Dependencies == | ||
| Line 14: | Line 16: | ||
* [[libexif]] | * [[libexif]] | ||
* [[libusb]] | * [[libusb]] | ||
* [[libptp2]] | |||
* [[resmgr]] | |||
* [[Gtk-Doc]] | |||
== Non-Multilib == | == Non-Multilib == | ||
| Line 19: | Line 24: | ||
Compile the package: | Compile the package: | ||
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c && | |||
./configure --prefix=/usr && | ./configure --prefix=/usr && | ||
make | make | ||
| Line 25: | Line 31: | ||
make install | make install | ||
== Multilib == | == Multilib == | ||
| Line 35: | Line 38: | ||
Compile the package: | Compile the package: | ||
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c && | |||
CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \ | ||
USE_ARCH=32 ./configure --prefix=/usr && | USE_ARCH=32 ./configure --prefix=/usr && | ||
| Line 49: | Line 53: | ||
Compile the package: | Compile the package: | ||
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c && | |||
CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ | CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \ | ||
USE_ARCH=n32 ./configure --prefix=/usr --libdir=/usr/lib32 && | USE_ARCH=n32 ./configure --prefix=/usr --libdir=/usr/lib32 && | ||
| Line 63: | Line 68: | ||
Compile the package: | Compile the package: | ||
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c && | |||
CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \ | ||
USE_ARCH=64 ./configure --prefix=/usr --libdir=/usr/lib64 && | USE_ARCH=64 ./configure --prefix=/usr --libdir=/usr/lib64 && | ||
| Line 74: | Line 80: | ||
ln -sfv multiarch_wrapper /usr/bin/gphoto2-config && | ln -sfv multiarch_wrapper /usr/bin/gphoto2-config && | ||
ln -sfv multiarch_wrapper /usr/bin/gphoto2-port-config | ln -sfv multiarch_wrapper /usr/bin/gphoto2-port-config | ||
== Configuring libgphoto2 with libptp2 == | |||
The following instructions explain how to change permissions to used libgphoto2 with [[Libptp2]] for a no-root user. | |||
=== Creating the camera Group === | |||
groupadd -g 70 camera | |||
and add your user in this group. | |||
=== Getting informations from your camera === | |||
In root, run the following command : | |||
ptpcam --list-devices | |||
You get something like this: | |||
Listing devices... | |||
bus/dev vendorID/prodID device model | |||
2/4 0x040A/0x05BA C633 Zoom Digital Camera | |||
=== Creating the udev rule file === | |||
With datas give (vendorID/prodID) by the ptpcam command, create the following udev rule file : | |||
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 | |||
== Contents == | |||
{| style="text-align: left;" | |||
|-valign="top" | |||
!Installed Directories: | |||
|/usr/lib/libgphoto2/{{Libgphoto2-Version}}, /usr/share/doc/libgphoto2, /usr/include/gphoto2 | |||
|-valign="top" | |||
!Installed Programs: | |||
|gphoto2-config | |||
|-valign="top" | |||
!Installed Libraries: | |||
|libgphoto2.{la,so}, libgphoto2_port.{la,so} | |||
|} | |||
[[Category:Cameras]] | |||
Latest revision as of 20:01, 13 May 2010
| Download Source: | http://prdownloads.sourceforge.net/gphoto/libgphoto2-2.4.9.1.tar.bz2 |
|---|
Introduction to Libgphoto2
libgphoto2 is the core library designed to allow access to digital camera by external programs.
Project Homepage: http://gphoto.sourceforge.net/proj/libgphoto2/
Dependencies
Optional
Non-Multilib
Compile the package:
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c && ./configure --prefix=/usr && make
Install the package
make install
Multilib
32Bit
Compile the package:
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c &&
CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
USE_ARCH=32 ./configure --prefix=/usr &&
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:
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c &&
CC="gcc ${BUILDN32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" \
USE_ARCH=n32 ./configure --prefix=/usr --libdir=/usr/lib32 &&
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:
sed -i "/dbus_connection/s/disconnect/close/" libgphoto2_port/disk/disk.c &&
CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
USE_ARCH=64 ./configure --prefix=/usr --libdir=/usr/lib64 &&
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 libptp2
The following instructions explain how to change permissions to used libgphoto2 with Libptp2 for a no-root user.
Creating the camera Group
groupadd -g 70 camera
and add your user in this group.
Getting informations from your camera
In root, run the following command :
ptpcam --list-devices
You get something like this:
Listing devices... bus/dev vendorID/prodID device model 2/4 0x040A/0x05BA C633 Zoom Digital Camera
Creating the udev rule file
With datas give (vendorID/prodID) by the ptpcam command, create the following udev rule file :
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
Contents
| Installed Directories: | /usr/lib/libgphoto2/2.4.9.1, /usr/share/doc/libgphoto2, /usr/include/gphoto2 |
|---|---|
| Installed Programs: | gphoto2-config |
| Installed Libraries: | libgphoto2.{la,so}, libgphoto2_port.{la,so} |