wok-stable annotate libgphoto2/receipt @ rev 4409
Up: pidgin-dev (2.6.3)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Tue Oct 20 20:16:08 2009 +0000 (2009-10-20) |
parents | b48f4163ea00 |
children | 157a71f716c6 |
rev | line source |
---|---|
jozee@3041 | 1 # SliTaz package receipt. |
jozee@3041 | 2 |
jozee@3041 | 3 PACKAGE="libgphoto2" |
jozee@3457 | 4 VERSION="2.4.6" |
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" |
jozee@3041 | 8 DEPENDS="libexif jpeg libusb libusb-compat" |
jozee@3041 | 9 BUILD_DEPENDS="jpeg-dev libexif-dev libtool libexif jpeg libusb libusb-dev libusb-compat libusb-compat-dev" |
jozee@3041 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
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 |
jozee@3041 | 16 # Rules to configure and make the package. |
jozee@3041 | 17 compile_rules() |
jozee@3041 | 18 { |
jozee@3041 | 19 cd $src |
jozee@3457 | 20 ./configure --prefix=/usr udevscriptdir=/lib/udev \ |
jozee@3457 | 21 --with-exif --disable-static && |
jozee@3041 | 22 make && |
jozee@3041 | 23 make DESTDIR=$PWD/_pkg install |
jozee@3041 | 24 |
jozee@3041 | 25 } |
jozee@3041 | 26 |
jozee@3041 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@3041 | 28 genpkg_rules() |
jozee@3041 | 29 { |
jozee@3457 | 30 mkdir -p $fs/usr/lib/$PACKAGE $fs/usr/share \ |
jozee@3457 | 31 $fs/lib \ |
jozee@3457 | 32 $fs/usr/share/hal/fdi/information/20thirdparty \ |
jozee@3457 | 33 $fs/etc/udev/rules.d |
jozee@3041 | 34 cp -a $_pkg/usr/bin $fs/usr |
jozee@3041 | 35 cp -a $_pkg/usr/lib/$PACKAGE $fs/usr/lib |
jozee@3041 | 36 cp -a $_pkg/usr/lib/${PACKAGE}_port $fs/usr/lib |
jozee@3041 | 37 cp -a $_pkg/usr/lib/udev $fs/usr/lib |
jozee@3041 | 38 cp -a $_pkg/usr/lib/*so* $fs/usr/lib |
jozee@3041 | 39 cp -a $_pkg/usr/share/$PACKAGE $fs/usr/share |
jozee@3457 | 40 cp -a $_pkg/lib/udev $fs/lib |
jozee@3457 | 41 |
jozee@3457 | 42 # rm archive files |
jozee@3457 | 43 rm -f $fs/usr/lib/libgphoto2/$VERSION/*.a |
jozee@3041 | 44 |
jozee@3457 | 45 # fix permissions |
jozee@3457 | 46 chmod +x $fs/lib/udev/check* |
jozee@3457 | 47 chmod +x $fs/usr/bin/gphoto2* |
jozee@3457 | 48 |
jozee@3457 | 49 HAL_FDI="usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" |
jozee@3457 | 50 UDEV_RULE="etc/udev/rules.d/70-libgphoto2.rules" |
jozee@3457 | 51 CAM_LIST="usr/lib/libgphoto2/print-camera-list" |
jozee@3457 | 52 |
jozee@3457 | 53 # Let print-camera-list find libgphoto2.so |
jozee@3457 | 54 export LD_LIBRARY_PATH="$fs/usr/lib" |
jozee@3457 | 55 # Let libgphoto2 find its camera-modules before running print-camera-list |
jozee@3457 | 56 export CAMLIBS="$fs/usr/lib/libgphoto2/$VERSION" |
jozee@3457 | 57 |
jozee@3457 | 58 # HAL file |
jozee@3457 | 59 "$fs/$CAM_LIST" hal-fdi > "$fs/$HAL_FDI" || return 1 |
jozee@3457 | 60 |
jozee@3457 | 61 #udev rule |
jozee@3457 | 62 "$fs/$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$fs/$UDEV_RULE" || return 1 |
jozee@3457 | 63 |
jozee@3041 | 64 } |
jozee@3457 | 65 |
jozee@3457 | 66 post_install() |
jozee@3457 | 67 { |
jozee@3457 | 68 local root |
jozee@3457 | 69 root=$1 |
jozee@3457 | 70 |
jozee@3457 | 71 # add group camera or plugdev |
jozee@3457 | 72 getent group camera >/dev/null || addgroup -g 97 camera |
jozee@3457 | 73 |
jozee@3457 | 74 echo "Don't forget to add yourself to group camera to use libgphoto2: addgroup tux camera" |
jozee@3457 | 75 } |
jozee@3457 | 76 |
jozee@3457 | 77 post_remove() |
jozee@3457 | 78 { |
jozee@3457 | 79 delgroup camera & >/dev/null |
jozee@3457 | 80 } |