summaryrefslogtreecommitdiff
path: root/extra/libgphoto2/PKGBUILD
blob: e4516607cec5e29c002c79a1d3eb4422162d29da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: PKGBUILD 101286 2010-11-28 17:59:39Z ibiru $
# Maintainer: Eduardo Romero <eduardo@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>

pkgname=libgphoto2
pkgver=2.4.10.1
pkgrel=2.1
pkgdesc="The core library of gphoto2, designed to allow access to digital camera by external programs."
arch=(i686 x86_64 'mips64el')
url="http://www.gphoto.org"
license=(LGPL)
depends=('libexif>=0.6.19' 'libjpeg>=8' 'gd' 'libtool>=2.4' 'libusb-compat')
install=libgphoto2.install
options=('libtool')
source=(http://downloads.sourceforge.net/gphoto/${pkgname}-${pkgver}.tar.gz)
md5sums=('8bf2bd1e267909203ec1e7f6ea3f83a0')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  udevscriptdir=/lib/udev ./configure --prefix=/usr --with-drivers=all --disable-static --disable-rpath
  LD_PRELOAD="" make
  make DESTDIR="${pkgdir}" install

  rm -f ${pkgdir}/usr/lib/libgphoto2/${pkgver}/*.a

  install -m755 -d "${pkgdir}/usr/share/hal/fdi/information/20thirdparty"
  install -m755 -d "${pkgdir}/lib/udev/rules.d"
  LD_LIBRARY_PATH="${pkgdir}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
  CAMLIBS="${pkgdir}/usr/lib/libgphoto2/${pkgver}" \
      "${pkgdir}/usr/lib/libgphoto2/print-camera-list" hal-fdi > \
      "${pkgdir}/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"

  LD_LIBRARY_PATH="${pkgdir}/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
  CAMLIBS="${pkgdir}/usr/lib/libgphoto2/${pkgver}" \
      "${pkgdir}/usr/lib/libgphoto2/print-camera-list" udev-rules version 136 group camera mode 0660 > \
      "${pkgdir}/lib/udev/rules.d/40-gphoto.rules"

  # Remove recursive symlink
  rm -f "${pkgdir}/usr/include/gphoto2/gphoto2"
}