wok-next view libgphoto2/receipt @ rev 19789
Add js, up pam, polkit, polkit-pam; fix typo in btrfs-progs.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Jun 20 03:48:54 2017 +0300 (2017-06-20) |
parents | 4048d48a47c1 |
children | 7ae7ca392d9e |
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 copy *.so* print-camera-list check-ptp-camera konica/ vcamera/
39 rm -rf $fs/usr/share/doc # *.so* files here
40 }
42 post_install()
43 {
44 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
45 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
46 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
48 # Let print-camera-list find libgphoto2.so
49 export LD_LIBRARY_PATH="$1/usr/lib"
50 # Let libgphoto2 find its camera-modules before running print-camera-list
51 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
53 # HAL file
54 mkdir -p "$(dirname "$HAL_FDI")"
55 "$CAM_LIST" hal-fdi > "$HAL_FDI"
57 #udev rule
58 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE"
60 tazpkg reconfigure eudev --root="$1"
62 # add group camera
63 if ! grep -q camera "$1/etc/group"; then
64 chroot "$1/" addgroup -g 97 camera
65 fi
67 [ -n "$quiet" ] || cat <<EOT
68 Don't forget to add yourself to group camera to use libgphoto2:
69 # addgroup tux camera
70 EOT
71 }
73 post_remove()
74 {
75 chroot "$1/" delgroup camera
76 }