wok view libgphoto2/receipt @ rev 23743

updated xcb-proto, libxcb and libxcb-dev (1.13 -> 1.14)
author Hans-G?nter Theisgen
date Fri May 01 13:39:34 2020 +0100 (2020-05-01)
parents 0f976ebfd6ad
children 65d7d867e0c1
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.24"
5 CATEGORY="graphics"
6 TAGS="camera photo"
7 SHORT_DESC="Core library of gphoto2 to access photos from digital camera."
8 MAINTAINER="jozee@slitaz.org"
9 LICENSE="LGPL2.1"
10 WEB_SITE="http://www.gphoto.org"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
15 DEPENDS="hal jpeg libexif libltdl libusb libusb-compat"
16 BUILD_DEPENDS="jpeg jpeg-dev libexif libexif-dev libtool \
17 libusb libusb-compat libusb-compat-dev libusb-dev pkg-config"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 ./configure \
23 --prefix=/usr \
24 udevscriptdir=/lib/udev \
25 --with-camlibs=everything \
26 --with-exif \
27 --disable-static \
28 $CONFIGURE_ARGS &&
29 make -j 1 &&
30 make install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p \
37 $fs/usr/lib/$PACKAGE \
38 $fs/usr/share \
39 $fs/lib \
40 $fs/usr/share/hal/fdi/information/20thirdparty \
41 $fs/etc/udev/rules.d
43 cp -a $install/usr/bin $fs/usr
44 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
45 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
46 cp -a $install/usr/lib/*so* $fs/usr/lib
47 cp -a $install/usr/share/$PACKAGE $fs/usr/share
48 cp -a $install/lib/udev $fs/lib
50 # remove all archive files
51 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
53 # fix permissions
54 chmod +x $fs/lib/udev/check*
55 chmod +x $fs/usr/bin/gphoto2*
56 }
58 post_install()
59 {
60 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
61 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
62 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
64 # Let print-camera-list find libgphoto2.so
65 export LD_LIBRARY_PATH="$1/usr/lib"
66 # Let libgphoto2 find its camera-modules before running print-camera-list
67 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
69 # HAL file
70 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
72 #udev rule
73 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
75 tazpkg reconfigure udev --root="$1"
77 # add group camera
78 if ! grep -q camera "$1/etc/group"
79 then
80 chroot "$1/" addgroup -g 97 camera
81 fi
83 echo
84 echo "Don't forget to add your user id to group camera to use libgphoto2:"
85 echo " # addgroup <user id> camera"
86 }
88 post_remove()
89 {
90 chroot "$1/" delgroup camera
91 }