wok-next view libgphoto2/receipt @ rev 10317

efreet: Add $CONFIGURE_ARGS.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat May 21 23:54:51 2011 +0000 (2011-05-21)
parents 1c07269ece96
children 85e47692efef
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.4.11"
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 libltdl 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"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure --prefix=/usr udevscriptdir=/lib/udev \
20 --with-exif --disable-static &&
21 make &&
22 make install
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr/lib/$PACKAGE $fs/usr/share \
30 $fs/lib \
31 $fs/usr/share/hal/fdi/information/20thirdparty \
32 $fs/etc/udev/rules.d
33 cp -a $_pkg/usr/bin $fs/usr
34 cp -a $_pkg/usr/lib/$PACKAGE $fs/usr/lib
35 cp -a $_pkg/usr/lib/${PACKAGE}_port $fs/usr/lib
36 cp -a $_pkg/usr/lib/*so* $fs/usr/lib
37 cp -a $_pkg/usr/share/$PACKAGE $fs/usr/share
38 cp -a $_pkg/lib/udev $fs/lib
40 # rm archive files
41 rm -f $fs/usr/lib/libgphoto2/$VERSION/*.*a
43 # fix permissions
44 chmod +x $fs/lib/udev/check*
45 chmod +x $fs/usr/bin/gphoto2*
47 }
49 post_install()
50 {
51 local root
52 root=$1
54 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
55 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
56 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
58 # Let print-camera-list find libgphoto2.so
59 export LD_LIBRARY_PATH="$1/usr/lib"
60 # Let libgphoto2 find its camera-modules before running print-camera-list
61 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
63 # HAL file
64 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
66 #udev rule
67 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
69 tazpkg reconfigure udev --root=$1
71 # add group camera
72 if ! grep -q camera $root/etc/group ; then
73 addgroup -g 97 camera
74 fi
76 echo "Don't forget to add yourself to group camera to use libgphoto2: addgroup tux camera"
77 }
79 post_remove()
80 {
81 chroot "$1/" delgroup camera & >/dev/null
82 }