Magellan Linux

Contents of /branches/R11-stable/extras/libgphoto2/libgphoto2-2.5.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 24313 - (show annotations) (download)
Fri Feb 20 10:06:20 2015 UTC (9 years, 2 months ago) by niro
File size: 1901 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="libgphoto2"
4 PVER="2.5.7"
5 PBUILD="r1"
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.1
14 >= sys-apps/usbutils-002
15 >= media-libs/libexif-0.6.21
16 >= net-dns/avahi-0.6.31
17 >= sys-fs/udev-216
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 udev
29
30 SRC_URI=(
31 sourceforge://gphoto/${SRCFILE}
32 mirror://${PNAME}/${SRCFILE}
33 )
34
35 UP2TARBALL="${PNAME}"
36 UP2DATE="updatecmd_sourceforge gphoto ${PNAME/2/} gz"
37
38 src_compile()
39 {
40 cd ${SRCDIR}
41
42 CFLAGS="${CFLAGS} -DCANON_EXPERIMENTAL_20D"
43
44 mconfigure \
45 udevscriptdir=$(mget-udev-dir) \
46 --without-hal \
47 GTKDOC=/bin/true \
48 --disable-docs \
49 --disable-gp2ddb \
50 --with-rpmbuild=/bin/true \
51 --with-drivers=all \
52 --with-libexif=auto \
53 --enable-nls \
54 --enable-bonjour \
55 || die
56
57 mmake || die
58 }
59
60 src_install()
61 {
62 cd ${SRCDIR}
63 mmake DESTDIR=${BINDIR} install || die
64
65 UDEV_RULES="$(mget-udev-rules-dir)/70-libgphoto2.rules"
66 CAM_LIST="/usr/$(mlibdir)/libgphoto2/print-camera-list"
67
68 # let print-camera-list find libgphoto2.so
69 export LD_LIBRARY_PATH="${BINDIR}/usr/$(mlibdir)"
70 # let libgphoto2 find its camera-modules
71 export CAMLIBS="${BINDIR}/usr/$(mlibdir)/libgphoto2/${PVER}"
72
73 echo "Generating UDEV-rules ..."
74 minstalldir ${UDEV_RULES%/*} || die
75 ${BINDIR}${CAM_LIST} udev-rules version 136 group plugdev >> ${BINDIR}/${UDEV_RULES} || die
76 }
77
78 preinstall()
79 {
80 # adds plugdev group
81 ${MLIBDIR}/mgroupadd -o "-g 302" plugdev
82 }
83
84 postinstall()
85 {
86 # delete old udev rules
87 if [[ -f ${MROOT}/etc/udev/rules.d/70-libgphoto2.rules ]]
88 then
89 rm -f ${MROOT}/etc/udev/rules.d/70-libgphoto2.rules
90 fi
91 }