wok-next annotate libgphoto2/receipt @ rev 21103

emacs: depends on emacs-common
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jan 03 11:21:15 2019 +0200 (2019-01-03)
parents d5aab818505e
children 994f7b97ebea
rev   line source
al@19858 1 # SliTaz package receipt v2.
jozee@3041 2
jozee@3041 3 PACKAGE="libgphoto2"
al@21087 4 VERSION="2.5.21"
jozee@3041 5 CATEGORY="graphics"
al@19693 6 SHORT_DESC="Core library of gphoto2 to access photos from digital camera"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@15473 8 LICENSE="LGPL2.1"
al@19693 9 WEB_SITE="http://www.gphoto.org/"
al@20883 10 REPOLOGY="gphoto2"
jozee@3041 11
al@21087 12 TARBALL="$PACKAGE-${VERSION//./_}-release.tar.gz"
al@21087 13 WGET_URL="https://github.com/gphoto/libgphoto2/archive/$TARBALL"
al@21087 14 TARBALL_SHA1="574948a2ef9e45f25b72bd324de0870fb649dd1c"
al@19693 15
al@21087 16 BUILD_DEPENDS="automake libtool gettext-dev libjpeg-turbo-dev libexif-dev \
al@21087 17 libusb-dev libxml2-dev libgd-dev" # use of libusb-compat-dev disabled while libusb found
al@21020 18 SPLIT="$PACKAGE-dev"
al@19693 19
al@21087 20 DEPENDS_std="libexif libgd libjpeg-turbo libltdl libusb libxml2 eudev"
al@21087 21 DEPENDS_dev="libgphoto2 libexif-dev"
al@21087 22
al@21087 23 TAGS_std="camera photo"
al@21087 24
al@20577 25 compile_rules() {
al@21087 26 autoreconf --install --symlink
al@21087 27
al@18567 28 ./configure \
al@18567 29 udevscriptdir=/lib/udev \
al@18567 30 --with-exif \
al@18567 31 --disable-static \
al@18567 32 $CONFIGURE_ARGS &&
al@20577 33 fix libtool &&
slaxemulator@9847 34 make &&
al@20905 35 make install || return 1
al@20905 36
al@20905 37 # Remove recursive symlink
al@20905 38 rm $install/usr/include/gphoto2/gphoto2
al@20905 39
al@21087 40 echo "Making 20-gphoto.hwdb..."
al@20905 41 mkdir -p $install/lib/udev/rules.d/
al@20905 42 export LD_LIBRARY_PATH="$install/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
al@20905 43 export CAMLIBS="$install/usr/lib/libgphoto2/$VERSION"
al@20905 44 $install/usr/lib/libgphoto2/print-camera-list hwdb \
al@20905 45 | install -Dm644 /dev/stdin $install/lib/udev/hwdb.d/20-gphoto.hwdb
al@21087 46
al@21087 47 echo "Making 40-gphoto.rules..."
al@20905 48 # version <num> is UDEV version, one of: "pre-0.98", "0.98", "136", "175", "201"
al@20905 49 # See #src/packaging/generic/print-camera-list.c.
al@20905 50 # We use eudev, so maybe udev version here should be changed.
al@20905 51 $install/usr/lib/libgphoto2/print-camera-list udev-rules version 201 group camera mode 0660 \
al@20905 52 | install -Dm644 /dev/stdin $install/lib/udev/rules.d/40-gphoto.rules
jozee@3041 53 }
jozee@3041 54
al@19858 55 post_install_libgphoto2() {
jozee@4968 56 # add group camera
al@20905 57 grep -q camera "$1/etc/group" || chroot "$1/" addgroup -g 97 -S camera
al@18567 58
al@19693 59 [ -n "$quiet" ] || cat <<EOT
al@20905 60
al@20905 61 .-----------------------------------------------------------------.
al@20905 62 | Don't forget to add yourself to group camera to use libgphoto2: |
al@20905 63 | |
al@20905 64 | # addgroup tux camera |
al@20905 65 '-----------------------------------------------------------------'
al@19693 66 EOT
jozee@3457 67 }
jozee@3457 68
al@19858 69 post_remove_libgphoto2() {
al@18567 70 chroot "$1/" delgroup camera
jozee@3457 71 }