wok view libgphoto2/receipt @ rev 25264
updated re2c (1.3 -> 3.0)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jul 15 08:59:55 2022 +0100 (2022-07-15) |
parents | 65d7d867e0c1 |
children | d3556b8f5c3d |
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="gcc83-lib-base hal jpeg libexif libltdl libusb libusb-compat"
17 BUILD_DEPENDS="gcc83 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 CC=gcc-83 \
33 CXX=g++-83 \
34 --prefix=/usr \
35 udevscriptdir=/lib/udev \
36 --with-camlibs=everything \
37 --with-exif \
38 --disable-static \
39 $CONFIGURE_ARGS &&
40 make &&
41 make install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/etc/udev/rules.d
48 mkdir -p $fs/lib
49 mkdir -p $fs/usr/lib/$PACKAGE
50 mkdir -p $fs/usr/share
51 mkdir -p $fs/usr/share/hal/fdi/information/20thirdparty
53 cp -a $install/usr/bin $fs/usr
54 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
55 cp -a $install/usr/lib/${PACKAGE}_port $fs/usr/lib
56 cp -a $install/usr/lib/*so* $fs/usr/lib
57 cp -a $install/usr/share/$PACKAGE $fs/usr/share
58 cp -a $install/lib/udev $fs/lib
60 # remove all archive files
61 find $fs/usr/lib -name "*.*a" -exec rm -f {} \; 2> /dev/null
63 # fix permissions
64 chmod +x $fs/lib/udev/check*
65 chmod +x $fs/usr/bin/gphoto2*
66 }
68 post_install()
69 {
70 HAL_FDI="$1/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
71 UDEV_RULE="$1/etc/udev/rules.d/70-libgphoto2.rules"
72 CAM_LIST="$1/usr/lib/libgphoto2/print-camera-list"
74 # Let print-camera-list find libgphoto2.so
75 export LD_LIBRARY_PATH="$1/usr/lib"
76 # Let libgphoto2 find its camera-modules before running print-camera-list
77 export CAMLIBS="$1/usr/lib/libgphoto2/$VERSION"
79 # HAL file
80 "$CAM_LIST" hal-fdi > "$HAL_FDI" || return 1
82 #udev rule
83 "$CAM_LIST" udev-rules version 0.98 group camera mode 0660 > "$UDEV_RULE" || return 1
85 tazpkg reconfigure udev --root="$1"
87 # add group camera
88 if ! grep -q camera "$1/etc/group"
89 then
90 chroot "$1/" addgroup -g 97 camera
91 fi
93 echo
94 echo "Don't forget to add user to group camera to use libgphoto2:"
95 echo " # addgroup <user> camera"
96 }
98 post_remove()
99 {
100 chroot "$1/" delgroup camera
101 }