wok-current annotate libgphoto2/receipt @ rev 23017

updated libcdio libcdio-dev (2.0.0 -> 2.1.0)
author Hans-G?nter Theisgen
date Tue Mar 03 13:41:23 2020 +0100 (2020-03-03)
parents 8897c7156a03
children 9613ce9a98f2
rev   line source
jozee@3041 1 # SliTaz package receipt.
jozee@3041 2
jozee@3041 3 PACKAGE="libgphoto2"
Hans-G?nter@21226 4 VERSION="2.5.22"
jozee@3041 5 CATEGORY="graphics"
Hans-G?nter@21226 6 TAGS="camera photo"
Hans-G?nter@21226 7 SHORT_DESC="Core library of gphoto2 to access photos from digital camera."
jozee@3041 8 MAINTAINER="jozee@slitaz.org"
pascal@15473 9 LICENSE="LGPL2.1"
Hans-G?nter@21226 10 WEB_SITE="http://www.gphoto.org"
Hans-G?nter@21226 11
slaxemulator@7283 12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
jozee@3041 13 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
jozee@3041 14
Hans-G?nter@21226 15 DEPENDS="hal jpeg libexif libltdl libusb libusb-compat"
Hans-G?nter@21226 16 BUILD_DEPENDS="jpeg jpeg-dev libexif libexif-dev libtool \
Hans-G?nter@21226 17 libusb libusb-compat libusb-compat-dev libusb-dev pkg-config"
pascal@15473 18
jozee@3041 19 # Rules to configure and make the package.
jozee@3041 20 compile_rules()
jozee@3041 21 {
Hans-G?nter@21226 22 ./configure \
Hans-G?nter@21226 23 --prefix=/usr \
Hans-G?nter@21226 24 udevscriptdir=/lib/udev \
Hans-G?nter@21226 25 --with-exif \
Hans-G?nter@21226 26 --disable-static \
al@18567 27 $CONFIGURE_ARGS &&
Hans-G?nter@21226 28 make -j 1 &&
slaxemulator@9847 29 make install
jozee@3041 30 }
jozee@3041 31
jozee@3041 32 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@3041 33 genpkg_rules()
jozee@3041 34 {
al@18567 35 mkdir -p \
al@18567 36 $fs/usr/lib/$PACKAGE \
al@18567 37 $fs/usr/share \
al@18567 38 $fs/lib \
al@18567 39 $fs/usr/share/hal/fdi/information/20thirdparty \
al@18567 40 $fs/etc/udev/rules.d
al@18567 41
Hans-G?nter@21226 42 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21226 43 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
Hans-G?nter@21226 44 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
Hans-G?nter@21226 45 cp -a $install/usr/lib/*so* $fs/usr/lib
Hans-G?nter@21226 46 cp -a $install/usr/share/$PACKAGE $fs/usr/share
Hans-G?nter@21226 47 cp -a $install/lib/udev $fs/lib
Hans-G?nter@21226 48
Hans-G?nter@21226 49 # remove all archive files
erjo@10679 50 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
al@18567 51
jozee@3457 52 # fix permissions
jozee@3457 53 chmod +x $fs/lib/udev/check*
jozee@3457 54 chmod +x $fs/usr/bin/gphoto2*
jozee@3041 55 }
jozee@3457 56
jozee@3457 57 post_install()
jozee@3457 58 {
pascal@18730 59 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
pascal@18730 60 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
pascal@18730 61 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
slaxemulator@9847 62
slaxemulator@9847 63 # Let print-camera-list find libgphoto2.so
pascal@18730 64 export LD_LIBRARY_PATH="$1/usr/lib"
slaxemulator@9847 65 # Let libgphoto2 find its camera-modules before running print-camera-list
pascal@18730 66 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
slaxemulator@9847 67
slaxemulator@9847 68 # HAL file
slaxemulator@9847 69 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
al@18567 70
slaxemulator@9847 71 #udev rule
slaxemulator@9847 72 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
al@18567 73
pascal@18730 74 tazpkg reconfigure udev --root="$1"
al@18567 75
jozee@4968 76 # add group camera
pascal@18730 77 if ! grep -q camera "$1/etc/group"; then
al@18567 78 chroot "$1/" addgroup -g 97 camera
jozee@4968 79 fi
al@18567 80
al@18567 81 echo
Hans-G?nter@21226 82 echo "Don't forget to add your user id to group camera to use libgphoto2:"
Hans-G?nter@21226 83 echo " # addgroup <user id> camera"
jozee@3457 84 }
jozee@3457 85
jozee@3457 86 post_remove()
jozee@3457 87 {
al@18567 88 chroot "$1/" delgroup camera
jozee@3457 89 }