wok-6.x annotate libgphoto2/receipt @ rev 13755

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