1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
3 # Contributor: Tom Gundersen <teg@jklm.no>
4 # Contributor: Eduardo Romero <eduardo@archlinux.org>
5 # Contributor: Damir Perisa <damir.perisa@bluewin.ch>
10 pkgdesc="Digital camera access library"
11 url="http://www.gphoto.org/"
14 depends=(libexif libjpeg gd libltdl libusb libxml2 curl)
15 makedepends=(autoconf-archive git)
16 provides=(libgphoto2.so)
18 _commit=6511898c4be52a9306f0791476561bdcebf5317d # tags/libgphoto2-2_5_30-release
19 source=("git+https://github.com/gphoto/libgphoto2#commit=$_commit")
21 validpgpkeys=('7C4AFD61D8AAE7570796A5172209D6902F969C95') # Marcus Meissner
25 git describe --tags | sed 's/^libgphoto2-//;s/-release//;s/^v//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
35 ./configure --prefix=/usr --disable-rpath
36 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
42 make DESTDIR="$pkgdir" install
44 # Remove unused udev helper
45 rm -rv "$pkgdir/usr/lib/udev"
51 cd "$pkgdir/usr/lib/libgphoto2"
53 export LD_LIBRARY_PATH="$pkgdir/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
54 export CAMLIBS="$PWD/$pkgver"
56 ./print-camera-list hwdb \
57 | install -Dm644 /dev/stdin "$pkgdir/usr/lib/udev/hwdb.d/20-gphoto.hwdb"
58 ./print-camera-list udev-rules version 201 \
59 | install -Dm644 /dev/stdin "$pkgdir/usr/lib/udev/rules.d/40-gphoto.rules"