wok-4.x annotate libgphoto2/receipt @ rev 9685
udev: needs $stuff.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri May 06 21:34:17 2011 +0000 (2011-05-06) |
parents | 14c207569d2e |
children | 1c07269ece96 |
rev | line source |
---|---|
jozee@3041 | 1 # SliTaz package receipt. |
jozee@3041 | 2 |
jozee@3041 | 3 PACKAGE="libgphoto2" |
slaxemulator@7283 | 4 VERSION="2.4.10.1" |
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@5003 | 8 DEPENDS="libexif jpeg libusb libusb-compat libtool 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 |
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 && |
pascal@5781 | 22 make -j 4 && |
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/*so* $fs/usr/lib |
jozee@3041 | 38 cp -a $_pkg/usr/share/$PACKAGE $fs/usr/share |
jozee@3457 | 39 cp -a $_pkg/lib/udev $fs/lib |
jozee@3457 | 40 |
jozee@3457 | 41 # rm archive files |
jozee@5021 | 42 rm -f $fs/usr/lib/libgphoto2/$VERSION/*.*a |
jozee@3041 | 43 |
jozee@3457 | 44 # fix permissions |
jozee@3457 | 45 chmod +x $fs/lib/udev/check* |
jozee@3457 | 46 chmod +x $fs/usr/bin/gphoto2* |
jozee@3457 | 47 |
jozee@3457 | 48 HAL_FDI="usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" |
jozee@3457 | 49 UDEV_RULE="etc/udev/rules.d/70-libgphoto2.rules" |
jozee@3457 | 50 CAM_LIST="usr/lib/libgphoto2/print-camera-list" |
jozee@3457 | 51 |
jozee@3457 | 52 # Let print-camera-list find libgphoto2.so |
jozee@3457 | 53 export LD_LIBRARY_PATH="$fs/usr/lib" |
jozee@3457 | 54 # Let libgphoto2 find its camera-modules before running print-camera-list |
jozee@3457 | 55 export CAMLIBS="$fs/usr/lib/libgphoto2/$VERSION" |
jozee@3457 | 56 |
jozee@3457 | 57 # HAL file |
jozee@3457 | 58 "$fs/$CAM_LIST" hal-fdi > "$fs/$HAL_FDI" || return 1 |
jozee@3457 | 59 |
jozee@3457 | 60 #udev rule |
jozee@3457 | 61 "$fs/$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$fs/$UDEV_RULE" || return 1 |
jozee@3457 | 62 |
jozee@3041 | 63 } |
jozee@3457 | 64 |
jozee@3457 | 65 post_install() |
jozee@3457 | 66 { |
jozee@3457 | 67 local root |
jozee@3457 | 68 root=$1 |
jozee@3457 | 69 |
jozee@5056 | 70 tazpkg reconfigure udev --root=$1 |
jozee@5056 | 71 |
jozee@4968 | 72 # add group camera |
jozee@5053 | 73 if ! grep -q camera $root/etc/group ; then |
jozee@4968 | 74 addgroup -g 97 camera |
jozee@4968 | 75 fi |
jozee@3457 | 76 |
jozee@3457 | 77 echo "Don't forget to add yourself to group camera to use libgphoto2: addgroup tux camera" |
jozee@3457 | 78 } |
jozee@3457 | 79 |
jozee@3457 | 80 post_remove() |
jozee@3457 | 81 { |
jozee@3457 | 82 delgroup camera & >/dev/null |
jozee@3457 | 83 } |