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