summaryrefslogtreecommitdiff
path: root/extra/libgphoto2/PKGBUILD
blob: 729d519077eb3afb57bbdf710625032a088619f6 (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
# $Id: PKGBUILD 145711 2011-12-28 14:52:22Z jgc $
# Maintainer: Eduardo Romero <eduardo@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>

pkgname=libgphoto2
pkgver=2.4.11
pkgrel=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' 'libjpeg>=8' 'gd' 'libltdl' 'libusb-compat')
install=libgphoto2.install
options=('libtool')
source=(http://downloads.sourceforge.net/gphoto/${pkgname}-${pkgver}.tar.gz)
md5sums=('a2230c31e320acb7ececd90bc02fe515')

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

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

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

  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" 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"
}