# Maintainer: Natanael Copa pkgname=libgphoto2 pkgver=2.5.8 pkgrel=1 pkgdesc="The core library of gphoto2, designed to allow access to digital camera by external programs." url="http://www.gphoto.org" arch="all" license="LGPL" depends="" depends_dev="libexif-dev libusb-dev" makedepends="$depends_dev libjpeg-turbo-dev libtool" install="$pkgname.pre-install $pkgname.pre-upgrade" subpackages="$pkgname-dev $pkgname-doc" replaces="libgphoto2-dev" source="http://downloads.sourceforge.net/gphoto/libgphoto2-$pkgver.tar.bz2" options="libtool" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" } build() { cd "$_builddir" udevscriptdir=/lib/udev ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --with-drivers=all \ --disable-static \ --disable-rpath \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/libgphoto2/*/*.a \ "$pkgdir"/usr/lib/*.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/54-gphoto.rules" || return 1 } md5sums="873ab01aced49c6b92a98e515db5dcef libgphoto2-2.5.8.tar.bz2" sha256sums="031a262e342fae43f724afe66787947ce1fb483277dfe5a8cf1fbe92c58e27b6 libgphoto2-2.5.8.tar.bz2" sha512sums="142957ce3c80e8ac091005ba51b24fc0b199aa46f1a196cb0cfd71e0101d6020f4dd0ec2deb7209ef9ff7b946453b5fd9faf944047c07eb9962d8d52c876b1f4 libgphoto2-2.5.8.tar.bz2"