wok-current view libgphoto2/receipt @ rev 22653

updated docbook-xsl-ns again (1.76.1 -> 1.79.1)
author Hans-G?nter Theisgen
date Tue Jan 14 14:58:06 2020 +0100 (2020-01-14)
parents 8897c7156a03
children 9613ce9a98f2
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.22"
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-exif \
26 --disable-static \
27 $CONFIGURE_ARGS &&
28 make -j 1 &&
29 make install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p \
36 $fs/usr/lib/$PACKAGE \
37 $fs/usr/share \
38 $fs/lib \
39 $fs/usr/share/hal/fdi/information/20thirdparty \
40 $fs/etc/udev/rules.d
42 cp -a $install/usr/bin $fs/usr
43 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
44 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
45 cp -a $install/usr/lib/*so* $fs/usr/lib
46 cp -a $install/usr/share/$PACKAGE $fs/usr/share
47 cp -a $install/lib/udev $fs/lib
49 # remove all archive files
50 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
52 # fix permissions
53 chmod +x $fs/lib/udev/check*
54 chmod +x $fs/usr/bin/gphoto2*
55 }
57 post_install()
58 {
59 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
60 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
61 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
63 # Let print-camera-list find libgphoto2.so
64 export LD_LIBRARY_PATH="$1/usr/lib"
65 # Let libgphoto2 find its camera-modules before running print-camera-list
66 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
68 # HAL file
69 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
71 #udev rule
72 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
74 tazpkg reconfigure udev --root="$1"
76 # add group camera
77 if ! grep -q camera "$1/etc/group"; then
78 chroot "$1/" addgroup -g 97 camera
79 fi
81 echo
82 echo "Don't forget to add your user id to group camera to use libgphoto2:"
83 echo " # addgroup <user id> camera"
84 }
86 post_remove()
87 {
88 chroot "$1/" delgroup camera
89 }