archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libgphoto2 / repos / extra-x86_64 / PKGBUILD
blobbd129d373e7dbf1c4cf2cad7966022a7f18758ed
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=2
10 pkgdesc="Digital camera access library"
11 url="http://www.gphoto.org/"
12 arch=(x86_64)
13 license=(LGPL)
14 depends=(
15   curl
16   gd
17   libexif
18   libjpeg
19   libltdl
20   libusb
21   libxml2
23 makedepends=(
24   autoconf-archive
25   git
27 provides=(libgphoto2{,_port}.so)
28 _commit=6511898c4be52a9306f0791476561bdcebf5317d  # tags/libgphoto2-2_5_30-release
29 source=("git+https://github.com/gphoto/libgphoto2#commit=$_commit")
30 sha256sums=('SKIP')
31 validpgpkeys=('7C4AFD61D8AAE7570796A5172209D6902F969C95') # Marcus Meissner
33 pkgver() {
34   cd $pkgname
35   git describe --tags | sed 's/^libgphoto2-//;s/-release//;s/^v//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
38 prepare() {
39   cd $pkgname
40   autoreconf -fvi
43 build() {
44   cd $pkgname
45   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
46     --disable-rpath
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
48   make
51 package() {
52   cd $pkgname
53   make DESTDIR="$pkgdir" install
55   # Remove unused udev helper
56   rm -rv "$pkgdir/usr/lib/udev"
58   _genudev
61 _genudev() (
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: