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