wok-next annotate libgphoto2/receipt @ rev 18669
Add xmgrace (5.1.25)
author | llev |
---|---|
date | Fri Dec 04 21:09:27 2015 +0100 (2015-12-04) |
parents | 8f447cf2eee5 |
children | 9e01bc6321ea |
rev | line source |
---|---|
jozee@3041 | 1 # SliTaz package receipt. |
jozee@3041 | 2 |
jozee@3041 | 3 PACKAGE="libgphoto2" |
slaxemulator@9847 | 4 VERSION="2.4.11" |
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 { |
al@18567 | 57 local root=$1 |
al@18567 | 58 |
al@18567 | 59 HAL_FDI="$root/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" |
al@18567 | 60 UDEV_RULE="$root/etc/udev/rules.d/70-libgphoto2.rules" |
al@18567 | 61 CAM_LIST="$root/usr/lib/libgphoto2/print-camera-list" |
slaxemulator@9847 | 62 |
slaxemulator@9847 | 63 # Let print-camera-list find libgphoto2.so |
al@18567 | 64 export LD_LIBRARY_PATH="$root/usr/lib" |
slaxemulator@9847 | 65 # Let libgphoto2 find its camera-modules before running print-camera-list |
al@18567 | 66 export CAMLIBS="$root/usr/lib/libgphoto2/$VERSION" |
slaxemulator@9847 | 67 |
slaxemulator@9847 | 68 # HAL file |
slaxemulator@9847 | 69 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1 |
al@18567 | 70 |
slaxemulator@9847 | 71 #udev rule |
slaxemulator@9847 | 72 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1 |
al@18567 | 73 |
al@18567 | 74 tazpkg reconfigure udev --root=$root |
al@18567 | 75 |
jozee@4968 | 76 # add group camera |
al@18567 | 77 if ! grep -q camera $root/etc/group; then |
al@18567 | 78 chroot "$1/" addgroup -g 97 camera |
jozee@4968 | 79 fi |
al@18567 | 80 |
al@18567 | 81 echo |
al@18567 | 82 echo "Don't forget to add yourself to group camera to use libgphoto2:" |
al@18567 | 83 echo " # addgroup tux camera" |
jozee@3457 | 84 } |
jozee@3457 | 85 |
jozee@3457 | 86 post_remove() |
jozee@3457 | 87 { |
al@18567 | 88 chroot "$1/" delgroup camera |
jozee@3457 | 89 } |