Annotation of /branches/magellan-next/core/libgphoto2/libgphoto2-2.4.11-r1.smage2
Parent Directory | Revision Log
Revision 8315 -
(hide annotations)
(download)
Thu Jul 14 16:38:39 2011 UTC (13 years, 2 months ago) by niro
File size: 1831 byte(s)
Thu Jul 14 16:38:39 2011 UTC (13 years, 2 months ago) by niro
File size: 1831 byte(s)
auto added: ver bump to 2.4.11-r1
1 | niro | 8315 | # $Id$ |
2 | |||
3 | PNAME="libgphoto2" | ||
4 | PVER="2.4.11" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="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-171" | ||
18 | |||
19 | SDEPEND=">= dev-util/pkgconfig-0.25 | ||
20 | >= sys-dev/flex-2.5.35 | ||
21 | >= sys-dev/gettext-0.18" | ||
22 | |||
23 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
24 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
25 | |||
26 | sminclude mtools mbuild | ||
27 | |||
28 | SRC_URI=( | ||
29 | sourceforge://gphoto/${SRCFILE} | ||
30 | mirror://${PNAME}/${SRCFILE} | ||
31 | ) | ||
32 | |||
33 | UP2DATE="updatecmd_sourceforge gphoto ${PNAME/2/} - ${PNAME}" | ||
34 | |||
35 | src_compile() | ||
36 | { | ||
37 | cd ${SRCDIR} | ||
38 | |||
39 | CFLAGS="${CFLAGS} -DCANON_EXPERIMENTAL_20D" | ||
40 | |||
41 | mconfigure \ | ||
42 | udevscriptdir=/lib/udev \ | ||
43 | --without-hal \ | ||
44 | GTKDOC=/bin/true \ | ||
45 | --disable-docs \ | ||
46 | --disable-gp2ddb \ | ||
47 | --with-rpmbuild=/bin/true \ | ||
48 | --with-drivers=all \ | ||
49 | --with-libexif=auto \ | ||
50 | --enable-nls \ | ||
51 | --enable-bonjour \ | ||
52 | || die | ||
53 | |||
54 | mmake || die | ||
55 | } | ||
56 | |||
57 | src_install() | ||
58 | { | ||
59 | cd ${SRCDIR} | ||
60 | mmake DESTDIR=${BINDIR} install || die | ||
61 | |||
62 | UDEV_RULES="/lib/udev/rules.d/70-libgphoto2.rules" | ||
63 | CAM_LIST="/usr/$(mlibdir)/libgphoto2/print-camera-list" | ||
64 | |||
65 | # let print-camera-list find libgphoto2.so | ||
66 | export LD_LIBRARY_PATH="${BINDIR}/usr/$(mlibdir)" | ||
67 | # let libgphoto2 find its camera-modules | ||
68 | export CAMLIBS="${BINDIR}/usr/$(mlibdir)/libgphoto2/${PVER}" | ||
69 | |||
70 | echo "Generating UDEV-rules ..." | ||
71 | minstalldir ${UDEV_RULES%/*} || die | ||
72 | ${BINDIR}${CAM_LIST} udev-rules version 136 group plugdev >> ${BINDIR}/${UDEV_RULES} || die | ||
73 | } | ||
74 | |||
75 | preinstall() | ||
76 | { | ||
77 | # adds plugdev group | ||
78 | ${MLIBDIR}/mgroupadd -o "-g 302" plugdev | ||
79 | } | ||
80 | |||
81 | postinstall() | ||
82 | { | ||
83 | # delete old udev rules | ||
84 | if [[ -f ${MROOT}/etc/udev/rules.d/70-libgphoto2.rules ]] | ||
85 | then | ||
86 | rm -f ${MROOT}/etc/udev/rules.d/70-libgphoto2.rules | ||
87 | fi | ||
88 | } |