wok-next view libgphoto2/receipt @ rev 21721

created recipes for efivar and efibootmgr
author Hans-G?nter Theisgen
date Tue Sep 01 10:09:15 2020 +0100 (2020-09-01)
parents 0f2575775b2d
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.21"
5 CATEGORY="graphics"
6 SHORT_DESC="Core library of gphoto2 to access photos from digital camera"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="LGPL2.1"
9 WEB_SITE="http://www.gphoto.org/"
11 TARBALL="$PACKAGE-${VERSION//./_}-release.tar.gz"
12 WGET_URL="https://github.com/gphoto/libgphoto2/archive/$TARBALL"
13 TARBALL_SHA1="574948a2ef9e45f25b72bd324de0870fb649dd1c"
15 BUILD_DEPENDS="automake libtool gettext-dev libjpeg-turbo-dev libexif-dev \
16 libusb-dev libxml2-dev libgd-dev" # use of libusb-compat-dev disabled while libusb found
17 SPLIT="$PACKAGE-dev"
19 DEPENDS_std="libexif libgd libjpeg-turbo libltdl libusb libxml2 eudev"
20 DEPENDS_dev="libgphoto2 libexif-dev"
22 TAGS_std="camera photo"
24 compile_rules() {
25 autoreconf --install --symlink
27 ./configure \
28 udevscriptdir=/lib/udev \
29 --with-exif \
30 --disable-static \
31 $CONFIGURE_ARGS &&
32 fix libtool &&
33 make &&
34 make install || return 1
36 # Remove recursive symlink
37 rm $install/usr/include/gphoto2/gphoto2
39 echo "Making 20-gphoto.hwdb..."
40 mkdir -p $install/lib/udev/rules.d/
41 export LD_LIBRARY_PATH="$install/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
42 export CAMLIBS="$install/usr/lib/libgphoto2/$VERSION"
43 $install/usr/lib/libgphoto2/print-camera-list hwdb \
44 | install -Dm644 /dev/stdin $install/lib/udev/hwdb.d/20-gphoto.hwdb
46 echo "Making 40-gphoto.rules..."
47 # version <num> is UDEV version, one of: "pre-0.98", "0.98", "136", "175", "201"
48 # See #src/packaging/generic/print-camera-list.c.
49 # We use eudev, so maybe udev version here should be changed.
50 $install/usr/lib/libgphoto2/print-camera-list udev-rules version 201 group camera mode 0660 \
51 | install -Dm644 /dev/stdin $install/lib/udev/rules.d/40-gphoto.rules
52 }
54 post_install_libgphoto2() {
55 # add group camera
56 grep -q camera "$1/etc/group" || chroot "$1/" addgroup -g 97 -S camera
58 [ -n "$quiet" ] || cat <<EOT
60 .-----------------------------------------------------------------.
61 | Don't forget to add yourself to group camera to use libgphoto2: |
62 | |
63 | # addgroup tux camera |
64 '-----------------------------------------------------------------'
65 EOT
66 }
68 post_remove_libgphoto2() {
69 chroot "$1/" delgroup camera
70 }