wok view libgphoto2/receipt @ rev 17613
Up: expat 2.1.0
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Thu Feb 12 19:30:27 2015 +0000 (2015-02-12) |
parents | b7319995b37e |
children | 911df1d92666 |
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 LICENSE="LGPL2.1"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.gphoto.org"
11 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
12 TAGS="camera photo"
14 DEPENDS="libexif jpeg libusb libusb-compat libltdl hal"
15 BUILD_DEPENDS="jpeg-dev libexif-dev libtool libexif jpeg libusb libusb-dev libusb-compat libusb-compat-dev pkg-config"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure --prefix=/usr udevscriptdir=/lib/udev \
22 --with-exif --disable-static $CONFIGURE_ARGS &&
23 make &&
24 make install
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr/lib/$PACKAGE $fs/usr/share \
32 $fs/lib \
33 $fs/usr/share/hal/fdi/information/20thirdparty \
34 $fs/etc/udev/rules.d
35 cp -a $install/usr/bin $fs/usr
36 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
37 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
38 cp -a $install/usr/lib/*so* $fs/usr/lib
39 cp -a $install/usr/share/$PACKAGE $fs/usr/share
40 cp -a $install/lib/udev $fs/lib
42 # rm all archive files
43 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
45 # fix permissions
46 chmod +x $fs/lib/udev/check*
47 chmod +x $fs/usr/bin/gphoto2*
49 }
51 post_install()
52 {
53 local root
54 root=$1
56 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
57 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
58 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
60 # Let print-camera-list find libgphoto2.so
61 export LD_LIBRARY_PATH="$1/usr/lib"
62 # Let libgphoto2 find its camera-modules before running print-camera-list
63 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
65 # HAL file
66 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
68 #udev rule
69 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
71 tazpkg reconfigure udev --root=$1
73 # add group camera
74 if ! grep -q camera $root/etc/group ; then
75 addgroup -g 97 camera
76 fi
78 echo "Don't forget to add yourself to group camera to use libgphoto2: addgroup tux camera"
79 }
81 post_remove()
82 {
83 chroot "$1/" delgroup camera & >/dev/null
84 }