Magellan Linux

Contents of /branches/R11-stable/extras/libgphoto2/libgphoto2-2.4.13-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19469 - (show annotations) (download)
Mon Sep 16 09:33:13 2013 UTC (10 years, 8 months ago) by niro
File size: 1882 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="libgphoto2"
4 PVER="2.4.13"
5 PBUILD="r3"
6
7 PCAT="media-libs"
8
9 DESCRIPTION="libgphoto2 is a portable library and gives access to more than 400 digital cameras."
10 HOMEPAGE="http://www.gphoto.org/"
11
12 DEPEND=">= dev-libs/libusb-1.0
13 >= media-libs/gd-2.0.35
14 >= sys-apps/usbutils-002
15 >= media-libs/libexif-0.6.20
16 >= net-dns/avahi-0.6.30
17 >= sys-fs/udev-206
18 >= sys-libs/libltdl-2.4"
19
20 SDEPEND=">= dev-util/pkgconfig-0.25
21 >= sys-dev/flex-2.5.35
22 >= sys-dev/gettext-0.18
23 >= sys-dev/libtool-2.4"
24
25 SRCFILE="${PNAME}-${PVER}.tar.gz"
26 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
27
28 sminclude mtools mbuild
29
30 SRC_URI=(
31 sourceforge://gphoto/${SRCFILE}
32 mirror://${PNAME}/${SRCFILE}
33 )
34
35 UP2DATE="updatecmd_sourceforge gphoto ${PNAME/2/} - ${PNAME}"
36
37 src_compile()
38 {
39 cd ${SRCDIR}
40
41 CFLAGS="${CFLAGS} -DCANON_EXPERIMENTAL_20D"
42
43 mconfigure \
44 udevscriptdir=/usr/lib/udev \
45 --without-hal \
46 GTKDOC=/bin/true \
47 --disable-docs \
48 --disable-gp2ddb \
49 --with-rpmbuild=/bin/true \
50 --with-drivers=all \
51 --with-libexif=auto \
52 --enable-nls \
53 --enable-bonjour \
54 || die
55
56 mmake || die
57 }
58
59 src_install()
60 {
61 cd ${SRCDIR}
62 mmake DESTDIR=${BINDIR} install || die
63
64 UDEV_RULES="/usr/lib/udev/rules.d/70-libgphoto2.rules"
65 CAM_LIST="/usr/$(mlibdir)/libgphoto2/print-camera-list"
66
67 # let print-camera-list find libgphoto2.so
68 export LD_LIBRARY_PATH="${BINDIR}/usr/$(mlibdir)"
69 # let libgphoto2 find its camera-modules
70 export CAMLIBS="${BINDIR}/usr/$(mlibdir)/libgphoto2/${PVER}"
71
72 echo "Generating UDEV-rules ..."
73 minstalldir ${UDEV_RULES%/*} || die
74 ${BINDIR}${CAM_LIST} udev-rules version 136 group plugdev >> ${BINDIR}/${UDEV_RULES} || die
75 }
76
77 preinstall()
78 {
79 # adds plugdev group
80 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
81 }
82
83 postinstall()
84 {
85 # delete old udev rules
86 if [[ -f ${MROOT}/etc/udev/rules.d/70-libgphoto2.rules ]]
87 then
88 rm -f ${MROOT}/etc/udev/rules.d/70-libgphoto2.rules
89 fi
90 }