wok-4.x view libgphoto2/receipt @ rev 5681
add ypbind-mt
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jun 03 10:50:27 2010 +0200 (2010-06-03) |
parents | 80d7ae9ad3b3 |
children | 49e501a55595 |
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.4.8"
5 CATEGORY="graphics"
6 SHORT_DESC="core library of gphoto2 to access photos from digital camera"
7 MAINTAINER="jozee@slitaz.org"
8 DEPENDS="libexif jpeg libusb libusb-compat libtool hal"
9 BUILD_DEPENDS="jpeg-dev libexif-dev libtool libexif jpeg libusb libusb-dev libusb-compat libusb-compat-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.gphoto.org"
12 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
13 TAGS="camera photo"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --prefix=/usr udevscriptdir=/lib/udev \
21 --with-exif --disable-static &&
22 make &&
23 make DESTDIR=$PWD/_pkg install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/usr/lib/$PACKAGE $fs/usr/share \
31 $fs/lib \
32 $fs/usr/share/hal/fdi/information/20thirdparty \
33 $fs/etc/udev/rules.d
34 cp -a $_pkg/usr/bin $fs/usr
35 cp -a $_pkg/usr/lib/$PACKAGE $fs/usr/lib
36 cp -a $_pkg/usr/lib/${PACKAGE}_port $fs/usr/lib
37 cp -a $_pkg/usr/lib/*so* $fs/usr/lib
38 cp -a $_pkg/usr/share/$PACKAGE $fs/usr/share
39 cp -a $_pkg/lib/udev $fs/lib
41 # rm archive files
42 rm -f $fs/usr/lib/libgphoto2/$VERSION/*.*a
44 # fix permissions
45 chmod +x $fs/lib/udev/check*
46 chmod +x $fs/usr/bin/gphoto2*
48 HAL_FDI="usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
49 UDEV_RULE="etc/udev/rules.d/70-libgphoto2.rules"
50 CAM_LIST="usr/lib/libgphoto2/print-camera-list"
52 # Let print-camera-list find libgphoto2.so
53 export LD_LIBRARY_PATH="$fs/usr/lib"
54 # Let libgphoto2 find its camera-modules before running print-camera-list
55 export CAMLIBS="$fs/usr/lib/libgphoto2/$VERSION"
57 # HAL file
58 "$fs/$CAM_LIST" hal-fdi > "$fs/$HAL_FDI" || return 1
60 #udev rule
61 "$fs/$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$fs/$UDEV_RULE" || return 1
63 }
65 post_install()
66 {
67 local root
68 root=$1
70 tazpkg reconfigure udev --root=$1
72 # add group camera
73 if ! grep -q camera $root/etc/group ; then
74 addgroup -g 97 camera
75 fi
77 echo "Don't forget to add yourself to group camera to use libgphoto2: addgroup tux camera"
78 }
80 post_remove()
81 {
82 delgroup camera & >/dev/null
83 }