wok annotate libgphoto2/receipt @ rev 23806

linld: add isoboot
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 24 16:16:52 2020 +0000 (2020-05-24)
parents 0f976ebfd6ad
children 65d7d867e0c1
rev   line source
jozee@3041 1 # SliTaz package receipt.
jozee@3041 2
jozee@3041 3 PACKAGE="libgphoto2"
Hans-G?nter@23068 4 VERSION="2.5.24"
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@23068 22 ./configure \
Hans-G?nter@23068 23 --prefix=/usr \
Hans-G?nter@23068 24 udevscriptdir=/lib/udev \
Hans-G?nter@23068 25 --with-camlibs=everything \
Hans-G?nter@23068 26 --with-exif \
Hans-G?nter@23068 27 --disable-static \
al@18567 28 $CONFIGURE_ARGS &&
Hans-G?nter@21226 29 make -j 1 &&
slaxemulator@9847 30 make install
jozee@3041 31 }
jozee@3041 32
jozee@3041 33 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@3041 34 genpkg_rules()
jozee@3041 35 {
al@18567 36 mkdir -p \
al@18567 37 $fs/usr/lib/$PACKAGE \
al@18567 38 $fs/usr/share \
al@18567 39 $fs/lib \
al@18567 40 $fs/usr/share/hal/fdi/information/20thirdparty \
al@18567 41 $fs/etc/udev/rules.d
al@18567 42
Hans-G?nter@21226 43 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21226 44 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
Hans-G?nter@21226 45 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
Hans-G?nter@21226 46 cp -a $install/usr/lib/*so* $fs/usr/lib
Hans-G?nter@21226 47 cp -a $install/usr/share/$PACKAGE $fs/usr/share
Hans-G?nter@21226 48 cp -a $install/lib/udev $fs/lib
Hans-G?nter@21226 49
Hans-G?nter@21226 50 # remove all archive files
erjo@10679 51 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
al@18567 52
jozee@3457 53 # fix permissions
Hans-G?nter@23068 54 chmod +x $fs/lib/udev/check*
Hans-G?nter@23068 55 chmod +x $fs/usr/bin/gphoto2*
jozee@3041 56 }
jozee@3457 57
jozee@3457 58 post_install()
jozee@3457 59 {
pascal@18730 60 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
pascal@18730 61 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
pascal@18730 62 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
slaxemulator@9847 63
slaxemulator@9847 64 # Let print-camera-list find libgphoto2.so
pascal@18730 65 export LD_LIBRARY_PATH="$1/usr/lib"
slaxemulator@9847 66 # Let libgphoto2 find its camera-modules before running print-camera-list
pascal@18730 67 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
slaxemulator@9847 68
slaxemulator@9847 69 # HAL file
slaxemulator@9847 70 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
al@18567 71
slaxemulator@9847 72 #udev rule
slaxemulator@9847 73 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
al@18567 74
pascal@18730 75 tazpkg reconfigure udev --root="$1"
al@18567 76
jozee@4968 77 # add group camera
Hans-G?nter@23068 78 if ! grep -q camera "$1/etc/group"
Hans-G?nter@23068 79 then
al@18567 80 chroot "$1/" addgroup -g 97 camera
jozee@4968 81 fi
al@18567 82
al@18567 83 echo
Hans-G?nter@21226 84 echo "Don't forget to add your user id to group camera to use libgphoto2:"
Hans-G?nter@21226 85 echo " # addgroup <user id> camera"
jozee@3457 86 }
jozee@3457 87
jozee@3457 88 post_remove()
jozee@3457 89 {
al@18567 90 chroot "$1/" delgroup camera
jozee@3457 91 }