wok-next view libgphoto2/receipt @ rev 20883

Check Repology info from h* to l* packages
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jul 11 02:06:34 2018 +0300 (2018-07-11)
parents 25deb7c6df08
children e7a485521d6a
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/"
10 REPOLOGY="gphoto2"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
15 BUILD_DEPENDS="libtool gettext libjpeg-turbo-dev libexif-dev libusb-dev"
16 SPLIT="libgphoto2-dev"
18 compile_rules() {
19 ./configure \
20 udevscriptdir=/lib/udev \
21 --with-exif \
22 --disable-static \
23 $CONFIGURE_ARGS &&
24 fix libtool &&
25 make &&
26 make install
27 }
29 genpkg_rules() {
30 case $PACKAGE in
31 libgphoto2)
32 copy @std
33 DEPENDS="eudev libexif libjpeg-turbo libltdl liblzma libusb \
34 libxml2 zlib"
35 TAGS="camera photo"
36 ;;
37 libgphoto2-dev)
38 copy @dev
39 DEPENDS="libgphoto2 eudev-dev libjpeg-turbo-dev libexif-dev \
40 libtool libusb-dev libxml2-dev xz-dev zlib"
41 ;;
42 esac
43 }
45 post_install_libgphoto2() {
46 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
47 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
48 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
50 # Let print-camera-list find libgphoto2.so
51 export LD_LIBRARY_PATH="$1/usr/lib"
52 # Let libgphoto2 find its camera-modules before running print-camera-list
53 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
55 # HAL file
56 mkdir -p "$(dirname "$HAL_FDI")"
57 "$CAM_LIST" hal-fdi > "$HAL_FDI"
59 #udev rule
60 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE"
62 # tazpkg reconfigure eudev --root="$1"
64 # add group camera
65 if ! grep -q camera "$1/etc/group"; then
66 chroot "$1/" addgroup -g 97 -S camera
67 fi
69 [ -n "$quiet" ] || cat <<EOT
70 Don't forget to add yourself to group camera to use libgphoto2:
71 # addgroup tux camera
72 EOT
73 }
75 post_remove_libgphoto2() {
76 chroot "$1/" delgroup camera
77 }