wok-next view libgphoto2/receipt @ rev 8654

Up: clutter 1.6.2
author Antoine Bodin <gokhlayeh@slitaz.org>
date Tue Feb 15 04:07:22 2011 +0100 (2011-02-15)
parents 14c207569d2e
children 1c07269ece96
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.4.10.1"
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 pkg-config"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
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 -j 4 &&
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 }