aboutsummaryrefslogtreecommitdiffstats
path: root/main/libgphoto2/APKBUILD
blob: 4cfa078a65ecc3484b8970e73f104e9d39d64666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgphoto2
pkgver=2.5.1
pkgrel=0
pkgdesc="The core library of gphoto2, designed to allow access to digital camera by external programs."
url="http://www.gphoto.org"
arch="all"
license="LGPL"
depends=""
depends_dev="libexif-dev libusb-compat-dev"
makedepends="$depends_dev libjpeg-turbo-dev libtool libiconv-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-dev $pkgname-doc"
replaces="libgphoto2-dev"
source="http://downloads.sourceforge.net/gphoto/libgphoto2-$pkgver.tar.bz2"
options="libtool"

_builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$_builddir"
	udevscriptdir=/lib/udev ./configure --prefix=/usr \
		--with-drivers=all \
		--disable-static \
		--disable-rpath \
		|| return 1
	LD_PRELOAD="" make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/libgphoto2/*/*.a \
		"$pkgdir"/usr/lib/*.la \
		"$pkgdir"/usr/lib/*.a

	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" udev-rules version 136 group camera mode 0660 > "$pkgdir/lib/udev/rules.d/54-gphoto.rules" || return 1
}

md5sums="66a54d320ee908eb0e26bfe2c03e30ed  libgphoto2-2.5.1.tar.bz2"
sha256sums="0f61c721cac4d96cf4435a4881689f43b004b109d15501fb575ee5798679c7b7  libgphoto2-2.5.1.tar.bz2"
sha512sums="5a471cf3715b7b82cbb1232ef6041b8cbe43e92d412d650a26c80c60976d6d089c30281781c32c7dff1be78f09f54ca2ab9c4f3501460bd099f576e288bdd30e  libgphoto2-2.5.1.tar.bz2"