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/"
27 provides=(libgphoto2{,_port}.so)
28 _commit=6511898c4be52a9306f0791476561bdcebf5317d # tags/libgphoto2-2_5_30-release
29 source=("git+https://github.com/gphoto/libgphoto2#commit=$_commit")
31 validpgpkeys=('7C4AFD61D8AAE7570796A5172209D6902F969C95') # Marcus Meissner
35 git describe --tags | sed 's/^libgphoto2-//;s/-release//;s/^v//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
45 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
47 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
53 make DESTDIR="$pkgdir" install
55 # Remove unused udev helper
56 rm -rv "$pkgdir/usr/lib/udev"
62 cd "$pkgdir/usr/lib/libgphoto2"
64 export LD_LIBRARY_PATH="$pkgdir/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
65 export CAMLIBS="$PWD/$pkgver"
67 ./print-camera-list hwdb \
68 | install -Dm644 /dev/stdin "$pkgdir/usr/lib/udev/hwdb.d/20-gphoto.hwdb"
69 ./print-camera-list udev-rules version 201 \
70 | install -Dm644 /dev/stdin "$pkgdir/usr/lib/udev/rules.d/40-gphoto.rules"
73 # vim:set sw=2 sts=-1 et: