wok-current view libgphoto2/receipt @ rev 19981
Up gphoto2 (2.5.14), thanks Pasquale
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jun 18 19:23:12 2017 +0200 (2017-06-18) |
parents | 9e01bc6321ea |
children | 0f976ebfd6ad |
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.14"
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 \
16 libusb-compat libusb-compat-dev pkg-config"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure \
22 --prefix=/usr \
23 udevscriptdir=/lib/udev \
24 --with-exif \
25 --disable-static \
26 $CONFIGURE_ARGS &&
27 make &&
28 make install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p \
35 $fs/usr/lib/$PACKAGE \
36 $fs/usr/share \
37 $fs/lib \
38 $fs/usr/share/hal/fdi/information/20thirdparty \
39 $fs/etc/udev/rules.d
40 cp -a $install/usr/bin $fs/usr
41 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
42 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
43 cp -a $install/usr/lib/*so* $fs/usr/lib
44 cp -a $install/usr/share/$PACKAGE $fs/usr/share
45 cp -a $install/lib/udev $fs/lib
47 # rm all archive files
48 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
50 # fix permissions
51 chmod +x $fs/lib/udev/check*
52 chmod +x $fs/usr/bin/gphoto2*
53 }
55 post_install()
56 {
57 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
58 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
59 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
61 # Let print-camera-list find libgphoto2.so
62 export LD_LIBRARY_PATH="$1/usr/lib"
63 # Let libgphoto2 find its camera-modules before running print-camera-list
64 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
66 # HAL file
67 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
69 #udev rule
70 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
72 tazpkg reconfigure udev --root="$1"
74 # add group camera
75 if ! grep -q camera "$1/etc/group"; then
76 chroot "$1/" addgroup -g 97 camera
77 fi
79 echo
80 echo "Don't forget to add yourself to group camera to use libgphoto2:"
81 echo " # addgroup tux camera"
82 }
84 post_remove()
85 {
86 chroot "$1/" delgroup camera
87 }