wok annotate libgphoto2/receipt @ rev 18077

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