# Maintainer: Natanael Copa pkgname=libgphoto2 pkgver=2.5.5.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 libusb-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" } 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="82ef7e980b7ba2399bb1a472efd0eda5 libgphoto2-2.5.5.1.tar.bz2" sha256sums="600e6bde24545eef4d2d8285af389a5ae738707becb018c78611b2d8a3054846 libgphoto2-2.5.5.1.tar.bz2" sha512sums="a274bb553abed2f498b28388b2e2bc1810b4f57823744e7461248020818f1b79430198d81091aaa8ddc18a2a2acc5acf4fce5800e80da5e7ba534f0c094c749a libgphoto2-2.5.5.1.tar.bz2"