wok-next view libgphoto2/receipt @ rev 20353

Up gphoto2, libgphoto2 (2.5.15)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 19 17:20:01 2017 +0100 (2017-11-19)
parents cdc00c73cee7
children 25deb7c6df08
line source
1 # SliTaz package receipt v2.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.15"
5 CATEGORY="graphics"
6 SHORT_DESC="Core library of gphoto2 to access photos from digital camera"
7 MAINTAINER="jozee@slitaz.org"
8 LICENSE="LGPL2.1"
9 WEB_SITE="http://www.gphoto.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
14 BUILD_DEPENDS="libtool gettext libjpeg-turbo-dev libexif-dev libusb-dev"
15 SPLIT="libgphoto2-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 ./configure \
21 udevscriptdir=/lib/udev \
22 --with-exif \
23 --disable-static \
24 $CONFIGURE_ARGS &&
25 make &&
26 make install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 case $PACKAGE in
33 libgphoto2)
34 copy @std
35 DEPENDS="eudev libexif libjpeg-turbo libltdl liblzma libusb \
36 libxml2 zlib"
37 TAGS="camera photo"
38 ;;
39 libgphoto2-dev)
40 copy @dev
41 DEPENDS="libgphoto2 eudev-dev libjpeg-turbo-dev libexif-dev \
42 libtool libusb-dev libxml2-dev xz-dev zlib"
43 ;;
44 esac
45 }
47 post_install_libgphoto2() {
48 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
49 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
50 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
52 # Let print-camera-list find libgphoto2.so
53 export LD_LIBRARY_PATH="$1/usr/lib"
54 # Let libgphoto2 find its camera-modules before running print-camera-list
55 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
57 # HAL file
58 mkdir -p "$(dirname "$HAL_FDI")"
59 "$CAM_LIST" hal-fdi > "$HAL_FDI"
61 #udev rule
62 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE"
64 # tazpkg reconfigure eudev --root="$1"
66 # add group camera
67 if ! grep -q camera "$1/etc/group"; then
68 chroot "$1/" addgroup -g 97 -S camera
69 fi
71 [ -n "$quiet" ] || cat <<EOT
72 Don't forget to add yourself to group camera to use libgphoto2:
73 # addgroup tux camera
74 EOT
75 }
77 post_remove_libgphoto2() {
78 chroot "$1/" delgroup camera
79 }