wok annotate libgphoto2/receipt @ rev 25054
Up quarry (0.3.0.1), sunxi-tools (1.4.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 06 08:51:13 2022 +0000 (2022-06-06) |
parents | 65d7d867e0c1 |
children | d3556b8f5c3d |
rev | line source |
---|---|
jozee@3041 | 1 # SliTaz package receipt. |
jozee@3041 | 2 |
jozee@3041 | 3 PACKAGE="libgphoto2" |
Hans-G?nter@24617 | 4 VERSION="2.5.29" |
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@24617 | 15 SUGGESTED="libgphoto2-lang" |
Hans-G?nter@24617 | 16 DEPENDS="gcc83-lib-base hal jpeg libexif libltdl libusb libusb-compat" |
Hans-G?nter@24617 | 17 BUILD_DEPENDS="gcc83 jpeg jpeg-dev libexif libexif-dev libltdl libtool |
Hans-G?nter@24617 | 18 libusb libusb-compat-dev libusb-dev pkg-config" |
pascal@15473 | 19 |
pascal@24411 | 20 # What is the latest version available today? |
pascal@24411 | 21 current_version() |
pascal@24411 | 22 { |
pascal@24411 | 23 wget -O - https://sourceforge.net/projects/gphoto/files/libgphoto/ 2>/dev/null | \ |
pascal@24411 | 24 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \ |
pascal@24411 | 25 sed '/scope="row/!d;s|.*/libgphoto/||;s|/.*||;q' |
pascal@24411 | 26 } |
pascal@24411 | 27 |
jozee@3041 | 28 # Rules to configure and make the package. |
jozee@3041 | 29 compile_rules() |
jozee@3041 | 30 { |
Hans-G?nter@23068 | 31 ./configure \ |
Hans-G?nter@24617 | 32 CC=gcc-83 \ |
Hans-G?nter@24617 | 33 CXX=g++-83 \ |
Hans-G?nter@23068 | 34 --prefix=/usr \ |
Hans-G?nter@23068 | 35 udevscriptdir=/lib/udev \ |
Hans-G?nter@23068 | 36 --with-camlibs=everything \ |
Hans-G?nter@23068 | 37 --with-exif \ |
Hans-G?nter@23068 | 38 --disable-static \ |
al@18567 | 39 $CONFIGURE_ARGS && |
Hans-G?nter@24617 | 40 make && |
slaxemulator@9847 | 41 make install |
jozee@3041 | 42 } |
jozee@3041 | 43 |
jozee@3041 | 44 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@3041 | 45 genpkg_rules() |
jozee@3041 | 46 { |
Hans-G?nter@24617 | 47 mkdir -p $fs/etc/udev/rules.d |
Hans-G?nter@24617 | 48 mkdir -p $fs/lib |
Hans-G?nter@24617 | 49 mkdir -p $fs/usr/lib/$PACKAGE |
Hans-G?nter@24617 | 50 mkdir -p $fs/usr/share |
Hans-G?nter@24617 | 51 mkdir -p $fs/usr/share/hal/fdi/information/20thirdparty |
al@18567 | 52 |
Hans-G?nter@21226 | 53 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21226 | 54 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib |
Hans-G?nter@21226 | 55 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib |
Hans-G?nter@21226 | 56 cp -a $install/usr/lib/*so* $fs/usr/lib |
Hans-G?nter@21226 | 57 cp -a $install/usr/share/$PACKAGE $fs/usr/share |
Hans-G?nter@21226 | 58 cp -a $install/lib/udev $fs/lib |
Hans-G?nter@21226 | 59 |
Hans-G?nter@21226 | 60 # remove all archive files |
erjo@10679 | 61 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null |
al@18567 | 62 |
jozee@3457 | 63 # fix permissions |
Hans-G?nter@23068 | 64 chmod +x $fs/lib/udev/check* |
Hans-G?nter@23068 | 65 chmod +x $fs/usr/bin/gphoto2* |
jozee@3041 | 66 } |
jozee@3457 | 67 |
jozee@3457 | 68 post_install() |
jozee@3457 | 69 { |
pascal@18730 | 70 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" |
pascal@18730 | 71 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules" |
pascal@18730 | 72 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list" |
slaxemulator@9847 | 73 |
slaxemulator@9847 | 74 # Let print-camera-list find libgphoto2.so |
pascal@18730 | 75 export LD_LIBRARY_PATH="$1/usr/lib" |
slaxemulator@9847 | 76 # Let libgphoto2 find its camera-modules before running print-camera-list |
pascal@18730 | 77 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION" |
slaxemulator@9847 | 78 |
slaxemulator@9847 | 79 # HAL file |
slaxemulator@9847 | 80 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1 |
al@18567 | 81 |
slaxemulator@9847 | 82 #udev rule |
slaxemulator@9847 | 83 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1 |
al@18567 | 84 |
pascal@18730 | 85 tazpkg reconfigure udev --root="$1" |
al@18567 | 86 |
jozee@4968 | 87 # add group camera |
Hans-G?nter@23068 | 88 if ! grep -q camera "$1/etc/group" |
Hans-G?nter@23068 | 89 then |
al@18567 | 90 chroot "$1/" addgroup -g 97 camera |
jozee@4968 | 91 fi |
al@18567 | 92 |
al@18567 | 93 echo |
Hans-G?nter@24617 | 94 echo "Don't forget to add user to group camera to use libgphoto2:" |
Hans-G?nter@24617 | 95 echo " # addgroup <user> camera" |
jozee@3457 | 96 } |
jozee@3457 | 97 |
jozee@3457 | 98 post_remove() |
jozee@3457 | 99 { |
al@18567 | 100 chroot "$1/" delgroup camera |
jozee@3457 | 101 } |