# Maintainer: Natanael Copa pkgname=libgphoto2 pkgver=2.5.3.1 pkgrel=0 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 libusbx-dev" makedepends="$depends_dev libjpeg-turbo-dev libtool libiconv-dev" 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" update_config_sub || return 1 } build() { cd "$_builddir" udevscriptdir=/lib/udev ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --with-drivers=all \ --disable-static \ --disable-rpath \ || return 1 LD_PRELOAD="" make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/libgphoto2/*/*.a \ "$pkgdir"/usr/lib/*.la \ "$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="aad2607a84442769c14f6acce2ca1ddf libgphoto2-2.5.3.1.tar.bz2" sha256sums="29322d3b163d1d91501280259ca16d1ba966e7d11739d8dc7cf07ef5e617cda2 libgphoto2-2.5.3.1.tar.bz2" sha512sums="86dc8848103ead23e950d9e3cfd19bec14acc3ee654431731f07c9518c439c8d7d24f832e623d23f3eef0fb554641fa3da9f8ac5b8db99ee00ccf3aa478f4a6f libgphoto2-2.5.3.1.tar.bz2"