Magellan Linux

Contents of /trunk/extras/libgphoto2/libgphoto2-2.4.13-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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