summaryrefslogtreecommitdiff
path: root/repo/libgphoto2
diff options
context:
space:
mode:
Diffstat (limited to 'repo/libgphoto2')
-rw-r--r--repo/libgphoto2/libgphoto2.pre-install5
-rw-r--r--repo/libgphoto2/libgphoto2.pre-upgrade5
-rw-r--r--repo/libgphoto2/libgphoto2.xibuild34
3 files changed, 44 insertions, 0 deletions
diff --git a/repo/libgphoto2/libgphoto2.pre-install b/repo/libgphoto2/libgphoto2.pre-install
new file mode 100644
index 0000000..c696fcd
--- /dev/null
+++ b/repo/libgphoto2/libgphoto2.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S camera 2>/dev/null
+
+exit 0
diff --git a/repo/libgphoto2/libgphoto2.pre-upgrade b/repo/libgphoto2/libgphoto2.pre-upgrade
new file mode 100644
index 0000000..c696fcd
--- /dev/null
+++ b/repo/libgphoto2/libgphoto2.pre-upgrade
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S camera 2>/dev/null
+
+exit 0
diff --git a/repo/libgphoto2/libgphoto2.xibuild b/repo/libgphoto2/libgphoto2.xibuild
new file mode 100644
index 0000000..b7ba6e6
--- /dev/null
+++ b/repo/libgphoto2/libgphoto2.xibuild
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+NAME="libgphoto2"
+DESC="The core library of gphoto2, designed to allow access to digital camera by external programs"
+
+MAKEDEPS=" libexif libusb libjpeg-turbo libtool"
+
+PKG_VER=2.5.30
+SOURCE="https://downloads.sourceforge.net/gphoto/libgphoto2-$PKG_VER.tar.bz2"
+
+build() {
+ udevscriptdir=/lib/udev ./configure \
+ --prefix=/usr \
+ --with-drivers=all \
+ --disable-static \
+ --disable-rpath
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+ rm -f "$PKG_DEST"/usr/lib/libgphoto2/*/*.a \
+ "$PKG_DEST"/usr/lib/*.a
+
+ install -m755 -d "$PKG_DEST/lib/udev/rules.d"
+ LD_LIBRARY_PATH="$PKG_DEST/usr/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
+ CAMLIBS="$PKG_DEST/usr/lib/libgphoto2/$PKG_VER" \
+ "$PKG_DEST/usr/lib/libgphoto2/print-camera-list" udev-rules version 136 group camera mode 0660 > "$PKG_DEST/lib/udev/rules.d/54-gphoto.rules"
+}
+