summaryrefslogtreecommitdiff
path: root/extra/libgphoto2
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/libgphoto2
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/libgphoto2')
-rw-r--r--extra/libgphoto2/PKGBUILD40
-rw-r--r--extra/libgphoto2/libgphoto2.install16
2 files changed, 56 insertions, 0 deletions
diff --git a/extra/libgphoto2/PKGBUILD b/extra/libgphoto2/PKGBUILD
new file mode 100644
index 000000000..23e7d74b9
--- /dev/null
+++ b/extra/libgphoto2/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 101286 2010-11-28 17:59:39Z ibiru $
+# Maintainer: Eduardo Romero <eduardo@archlinux.org>
+# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
+
+pkgname=libgphoto2
+pkgver=2.4.10.1
+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"
+license=(LGPL)
+depends=('libexif>=0.6.19' 'libjpeg>=8' 'gd' 'libtool>=2.4' 'libusb-compat')
+install=libgphoto2.install
+options=('libtool')
+source=(http://downloads.sourceforge.net/gphoto/${pkgname}-${pkgver}.tar.gz)
+md5sums=('8bf2bd1e267909203ec1e7f6ea3f83a0')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ udevscriptdir=/lib/udev ./configure --prefix=/usr --with-drivers=all --disable-static --disable-rpath
+ LD_PRELOAD="" make
+ make DESTDIR="${pkgdir}" install
+
+ rm -f ${pkgdir}/usr/lib/libgphoto2/${pkgver}/*.a
+
+ install -m755 -d "${pkgdir}/usr/share/hal/fdi/information/20thirdparty"
+ install -m755 -d "${pkgdir}/lib/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"
+
+ 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 136 group camera mode 0660 > \
+ "${pkgdir}/lib/udev/rules.d/40-gphoto.rules"
+
+ # Remove recursive symlink
+ rm -f "${pkgdir}/usr/include/gphoto2/gphoto2"
+}
diff --git a/extra/libgphoto2/libgphoto2.install b/extra/libgphoto2/libgphoto2.install
new file mode 100644
index 000000000..3aee9ff8a
--- /dev/null
+++ b/extra/libgphoto2/libgphoto2.install
@@ -0,0 +1,16 @@
+post_install() {
+ getent group camera >/dev/null || usr/sbin/groupadd -g 97 camera
+ /bin/cat <<THEEND
+NOTE
+----
+Add your user to group 'camera' to use camera devices.
+THEEND
+}
+
+post_upgrade() {
+ getent group camera >/dev/null || usr/sbin/groupadd -g 97 camera
+}
+
+post_remove() {
+ usr/sbin/groupdel camera &>/dev/null
+}