wok-current annotate libgphoto2/receipt @ rev 19981
Up gphoto2 (2.5.14), thanks Pasquale
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jun 18 19:23:12 2017 +0200 (2017-06-18) |
parents | 9e01bc6321ea |
children | 0f976ebfd6ad |
rev | line source |
---|---|
jozee@3041 | 1 # SliTaz package receipt. |
jozee@3041 | 2 |
jozee@3041 | 3 PACKAGE="libgphoto2" |
pascal@19981 | 4 VERSION="2.5.14" |
jozee@3041 | 5 CATEGORY="graphics" |
jozee@3041 | 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" |
slaxemulator@7283 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
jozee@3041 | 10 WEB_SITE="http://www.gphoto.org" |
jozee@3041 | 11 WGET_URL="$SF_MIRROR/gphoto/$TARBALL" |
jozee@3041 | 12 TAGS="camera photo" |
jozee@3041 | 13 |
pascal@15473 | 14 DEPENDS="libexif jpeg libusb libusb-compat libltdl hal" |
al@18567 | 15 BUILD_DEPENDS="jpeg-dev libexif-dev libtool libexif jpeg libusb libusb-dev \ |
al@18567 | 16 libusb-compat libusb-compat-dev pkg-config" |
pascal@15473 | 17 |
jozee@3041 | 18 # Rules to configure and make the package. |
jozee@3041 | 19 compile_rules() |
jozee@3041 | 20 { |
al@18567 | 21 ./configure \ |
al@18567 | 22 --prefix=/usr \ |
al@18567 | 23 udevscriptdir=/lib/udev \ |
al@18567 | 24 --with-exif \ |
al@18567 | 25 --disable-static \ |
al@18567 | 26 $CONFIGURE_ARGS && |
slaxemulator@9847 | 27 make && |
slaxemulator@9847 | 28 make install |
jozee@3041 | 29 } |
jozee@3041 | 30 |
jozee@3041 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@3041 | 32 genpkg_rules() |
jozee@3041 | 33 { |
al@18567 | 34 mkdir -p \ |
al@18567 | 35 $fs/usr/lib/$PACKAGE \ |
al@18567 | 36 $fs/usr/share \ |
al@18567 | 37 $fs/lib \ |
al@18567 | 38 $fs/usr/share/hal/fdi/information/20thirdparty \ |
al@18567 | 39 $fs/etc/udev/rules.d |
pascal@15473 | 40 cp -a $install/usr/bin $fs/usr |
pascal@15473 | 41 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib |
pascal@15473 | 42 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib |
pascal@15473 | 43 cp -a $install/usr/lib/*so* $fs/usr/lib |
pascal@15473 | 44 cp -a $install/usr/share/$PACKAGE $fs/usr/share |
pascal@15473 | 45 cp -a $install/lib/udev $fs/lib |
al@18567 | 46 |
erjo@10679 | 47 # rm all archive files |
erjo@10679 | 48 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null |
al@18567 | 49 |
jozee@3457 | 50 # fix permissions |
jozee@3457 | 51 chmod +x $fs/lib/udev/check* |
jozee@3457 | 52 chmod +x $fs/usr/bin/gphoto2* |
jozee@3041 | 53 } |
jozee@3457 | 54 |
jozee@3457 | 55 post_install() |
jozee@3457 | 56 { |
pascal@18730 | 57 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" |
pascal@18730 | 58 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules" |
pascal@18730 | 59 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list" |
slaxemulator@9847 | 60 |
slaxemulator@9847 | 61 # Let print-camera-list find libgphoto2.so |
pascal@18730 | 62 export LD_LIBRARY_PATH="$1/usr/lib" |
slaxemulator@9847 | 63 # Let libgphoto2 find its camera-modules before running print-camera-list |
pascal@18730 | 64 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION" |
slaxemulator@9847 | 65 |
slaxemulator@9847 | 66 # HAL file |
slaxemulator@9847 | 67 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1 |
al@18567 | 68 |
slaxemulator@9847 | 69 #udev rule |
slaxemulator@9847 | 70 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1 |
al@18567 | 71 |
pascal@18730 | 72 tazpkg reconfigure udev --root="$1" |
al@18567 | 73 |
jozee@4968 | 74 # add group camera |
pascal@18730 | 75 if ! grep -q camera "$1/etc/group"; then |
al@18567 | 76 chroot "$1/" addgroup -g 97 camera |
jozee@4968 | 77 fi |
al@18567 | 78 |
al@18567 | 79 echo |
al@18567 | 80 echo "Don't forget to add yourself to group camera to use libgphoto2:" |
al@18567 | 81 echo " # addgroup tux camera" |
jozee@3457 | 82 } |
jozee@3457 | 83 |
jozee@3457 | 84 post_remove() |
jozee@3457 | 85 { |
al@18567 | 86 chroot "$1/" delgroup camera |
jozee@3457 | 87 } |