PKGBUILDs/extra/libgphoto2/PKGBUILD

43 lines
1.7 KiB
Bash
Raw Normal View History

2009-10-10 02:23:22 +00:00
# $Id: PKGBUILD 43742 2009-06-30 04:56:41Z allan $
# Maintainer: Eduardo Romero <eduardo@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
pkgname=libgphoto2
pkgver=2.4.6
pkgrel=2
pkgdesc="The core library of gphoto2, designed to allow access to digital camera by external programs."
arch=(i686 x86_64)
url="http://www.gphoto.org"
depends=('libexif>=0.6.17' 'libjpeg>=7' 'libtool>=2.2.6a' 'hal>=0.5.12git20090421.4fc367')
license=(LGPL)
install=(libgphoto2.install)
source=(http://downloads.sourceforge.net/gphoto/${pkgname}-${pkgver}.tar.gz)
md5sums=('3ad331acbe7e6ff4601705d504bdff94')
options=('libtool')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --with-exif --disable-static || return 1
LD_PRELOAD="" make || return 1
make DESTDIR="${pkgdir}" install || return 1
rm -f ${pkgdir}/usr/lib/libgphoto2/${pkgver}/*.a
install -m755 -d "${pkgdir}/usr/share/hal/fdi/information/20thirdparty"
install -m755 -d "${pkgdir}/etc/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" hal-fdi > \
"${pkgdir}/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi" || return 1
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 0.98 group camera mode 0660 > \
"${pkgdir}/etc/udev/rules.d/54-gphoto.rules" || return 1
install -m755 -d "${pkgdir}/lib"
mv "${pkgdir}/usr/lib/udev" "${pkgdir}/lib/" || return 1
# Remove recursive symlink
rm -f "${pkgdir}/usr/include/gphoto2/gphoto2" || return 1
}