wok-next view libgphoto2/receipt @ rev 19715

Fix building: pciutils, pcmanfm-legacy, arj
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 13 17:25:31 2017 +0300 (2017-05-13)
parents 9e01bc6321ea
children f463de72afe3
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.13"
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 WEB_SITE="http://www.gphoto.org/"
10 TAGS="camera photo"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
15 DEPENDS="eudev libexif libjpeg-turbo libltdl liblzma libusb libxml2 zlib"
16 BUILD_DEPENDS="jpeg-dev libexif-dev libtool libexif jpeg libusb libusb-dev \
17 libusb-compat libusb-compat-dev pkg-config"
19 BUILD_DEPENDS="libtool gettext libjpeg-turbo-dev libexif-dev libusb-dev"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 find $src -name '*.c' -exec sed -i 's|_BSD_SOURCE|_DEFAULT_SOURCE|' \{\} \;
26 ./configure \
27 udevscriptdir=/lib/udev \
28 --with-exif \
29 --disable-static \
30 $CONFIGURE_ARGS &&
31 make &&
32 make install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 cook_copy_files *.so* print-camera-list check-ptp-camera
39 cook_copy_folders konica vcamera
40 rm -rf $fs/usr/share/doc # *.so* files here
41 }
43 post_install()
44 {
45 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
46 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
47 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
49 # Let print-camera-list find libgphoto2.so
50 export LD_LIBRARY_PATH="$1/usr/lib"
51 # Let libgphoto2 find its camera-modules before running print-camera-list
52 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
54 # HAL file
55 mkdir -p "$(dirname "$HAL_FDI")"
56 "$CAM_LIST" hal-fdi > "$HAL_FDI"
58 #udev rule
59 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE"
61 tazpkg reconfigure eudev --root="$1"
63 # add group camera
64 if ! grep -q camera "$1/etc/group"; then
65 chroot "$1/" addgroup -g 97 camera
66 fi
68 [ -n "$quiet" ] || cat <<EOT
69 Don't forget to add yourself to group camera to use libgphoto2:
70 # addgroup tux camera
71 EOT
72 }
74 post_remove()
75 {
76 chroot "$1/" delgroup camera
77 }