wok-next view libgphoto2/receipt @ rev 20734

nut: update (b)deps
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 29 18:57:36 2018 +0300 (2018-05-29)
parents a9800ada65e2
children df20b2110f7e
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 compile_rules() {
18 ./configure \
19 udevscriptdir=/lib/udev \
20 --with-exif \
21 --disable-static \
22 $CONFIGURE_ARGS &&
23 fix libtool &&
24 make &&
25 make install
26 }
28 genpkg_rules() {
29 case $PACKAGE in
30 libgphoto2)
31 copy @std
32 DEPENDS="eudev libexif libjpeg-turbo libltdl liblzma libusb \
33 libxml2 zlib"
34 TAGS="camera photo"
35 ;;
36 libgphoto2-dev)
37 copy @dev
38 DEPENDS="libgphoto2 eudev-dev libjpeg-turbo-dev libexif-dev \
39 libtool libusb-dev libxml2-dev xz-dev zlib"
40 ;;
41 esac
42 }
44 post_install_libgphoto2() {
45 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
46 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
47 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
49 # Let print-camera-list find libgphoto2.so
50 export LD_LIBRARY_PATH="$1/usr/lib"
51 # Let libgphoto2 find its camera-modules before running print-camera-list
52 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
54 # HAL file
55 mkdir -p "$(dirname "$HAL_FDI")"
56 "$CAM_LIST" hal-fdi > "$HAL_FDI"
58 #udev rule
59 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE"
61 # tazpkg reconfigure eudev --root="$1"
63 # add group camera
64 if ! grep -q camera "$1/etc/group"; then
65 chroot "$1/" addgroup -g 97 -S camera
66 fi
68 [ -n "$quiet" ] || cat <<EOT
69 Don't forget to add yourself to group camera to use libgphoto2:
70 # addgroup tux camera
71 EOT
72 }
74 post_remove_libgphoto2() {
75 chroot "$1/" delgroup camera
76 }