OCaml 4.14.0 rebuild
[arch-packages.git] / libgphoto2 / repos / extra-x86_64 / PKGBUILD
blob0e3be3642ce21dec1c9adf3064412e0cc414a027
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>
7 pkgname=libgphoto2
8 pkgver=2.5.30
9 pkgrel=1
10 pkgdesc="Digital camera access library"
11 url="http://www.gphoto.org/"
12 arch=(x86_64)
13 license=(LGPL)
14 depends=(libexif libjpeg gd libltdl libusb libxml2 curl)
15 makedepends=(autoconf-archive git)
16 provides=(libgphoto2.so)
17 options=(debug)
18 _commit=6511898c4be52a9306f0791476561bdcebf5317d  # tags/libgphoto2-2_5_30-release
19 source=("git+https://github.com/gphoto/libgphoto2#commit=$_commit")
20 sha256sums=('SKIP')
21 validpgpkeys=('7C4AFD61D8AAE7570796A5172209D6902F969C95') # Marcus Meissner
23 pkgver() {
24   cd $pkgname
25   git describe --tags | sed 's/^libgphoto2-//;s/-release//;s/^v//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
28 prepare() {
29   cd $pkgname
30   autoreconf -fvi
33 build() {
34   cd $pkgname
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
37   make
40 package() {
41   cd $pkgname
42   make DESTDIR="$pkgdir" install
44   # Remove unused udev helper
45   rm -rv "$pkgdir/usr/lib/udev"
47   _genudev
50 _genudev() (
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"
62 # vim:set sw=2 et: