wok-current view libgphoto2/receipt @ rev 25618

Use default gcc 6.3 for libgphoto2
author Stanislas Leduc <shann@slitaz.org>
date Sun Sep 03 19:59:46 2023 +0000 (16 months ago)
parents 63c8af9d3a64
children 5926178cd6fa
line source
1 # SliTaz package receipt.
3 PACKAGE="libgphoto2"
4 VERSION="2.5.29"
5 CATEGORY="graphics"
6 TAGS="camera photo"
7 SHORT_DESC="Core library of gphoto2 to access photos from digital camera."
8 MAINTAINER="jozee@slitaz.org"
9 LICENSE="LGPL2.1"
10 WEB_SITE="http://www.gphoto.org"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="$SF_MIRROR/gphoto/$TARBALL"
15 SUGGESTED="libgphoto2-lang"
16 DEPENDS="hal jpeg libexif libltdl libusb libusb-compat"
17 BUILD_DEPENDS="jpeg jpeg-dev libexif libexif-dev libltdl libtool
18 libusb libusb-compat-dev libusb-dev pkg-config"
20 # What is the latest version available today?
21 current_version()
22 {
23 wget -O - https://sourceforge.net/projects/gphoto/files/libgphoto/ 2>/dev/null | \
24 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
25 sed '/scope="row/!d;s|.*/libgphoto/||;s|/.*||;q'
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 ./configure \
32 --prefix=/usr \
33 udevscriptdir=/lib/udev \
34 --with-camlibs=everything \
35 --with-exif \
36 --disable-static \
37 $CONFIGURE_ARGS &&
38 make &&
39 make install
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/etc/udev/rules.d
46 mkdir -p $fs/lib
47 mkdir -p $fs/usr/lib/$PACKAGE
48 mkdir -p $fs/usr/share
49 mkdir -p $fs/usr/share/hal/fdi/information/20thirdparty
51 cp -a $install/usr/bin $fs/usr
52 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
53 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
54 cp -a $install/usr/lib/*so* $fs/usr/lib
55 cp -a $install/usr/share/$PACKAGE $fs/usr/share
56 cp -a $install/lib/udev $fs/lib
58 # remove all archive files
59 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
61 # fix permissions
62 chmod +x $fs/lib/udev/check*
63 chmod +x $fs/usr/bin/gphoto2*
64 }
66 post_install()
67 {
68 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
69 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
70 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
72 # Let print-camera-list find libgphoto2.so
73 export LD_LIBRARY_PATH="$1/usr/lib"
74 # Let libgphoto2 find its camera-modules before running print-camera-list
75 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
77 # HAL file
78 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
80 #udev rule
81 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
83 tazpkg reconfigure udev --root="$1"
85 # add group camera
86 if ! grep -q camera "$1/etc/group"
87 then
88 chroot "$1/" addgroup -g 97 camera
89 fi
91 echo
92 echo "Don't forget to add user to group camera to use libgphoto2:"
93 echo " # addgroup <user> camera"
94 }
96 post_remove()
97 {
98 chroot "$1/" delgroup camera
99 }