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