wok-next view libgphoto2/receipt @ rev 19860
Up cookutils, libgphoto2, slitaz-base-files, tazlito
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Sep 08 14:18:05 2017 +0300 (2017-09-08) |
parents | 7ae7ca392d9e |
children | a9800ada65e2 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.13"
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 find $src -name '*.c' -exec sed -i 's|_BSD_SOURCE|_DEFAULT_SOURCE|' \{\} \;
22 ./configure \
23 udevscriptdir=/lib/udev \
24 --with-exif \
25 --disable-static \
26 $CONFIGURE_ARGS &&
27 make &&
28 make install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 case $PACKAGE in
35 libgphoto2)
36 copy @std
37 DEPENDS="eudev libexif libjpeg-turbo libltdl liblzma libusb \
38 libxml2 zlib"
39 TAGS="camera photo"
40 ;;
41 libgphoto2-dev)
42 copy @dev
43 DEPENDS="libgphoto2 eudev-dev libjpeg-turbo-dev libexif-dev \
44 libtool libusb-dev libxml2-dev xz-dev zlib"
45 ;;
46 esac
47 }
49 post_install_libgphoto2() {
50 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
51 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
52 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
54 # Let print-camera-list find libgphoto2.so
55 export LD_LIBRARY_PATH="$1/usr/lib"
56 # Let libgphoto2 find its camera-modules before running print-camera-list
57 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
59 # HAL file
60 mkdir -p "$(dirname "$HAL_FDI")"
61 "$CAM_LIST" hal-fdi > "$HAL_FDI"
63 #udev rule
64 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE"
66 # tazpkg reconfigure eudev --root="$1"
68 # add group camera
69 if ! grep -q camera "$1/etc/group"; then
70 chroot "$1/" addgroup -g 97 -S camera
71 fi
73 [ -n "$quiet" ] || cat <<EOT
74 Don't forget to add yourself to group camera to use libgphoto2:
75 # addgroup tux camera
76 EOT
77 }
79 post_remove_libgphoto2() {
80 chroot "$1/" delgroup camera
81 }