aboutsummaryrefslogtreecommitdiffstats
path: root/main/libgphoto2/APKBUILD
blob: 179ed0fae7a5355c55bc653a6d7388098a7dec98 (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
45
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgphoto2
pkgver=2.5.16
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-dev"
makedepends="$depends_dev libjpeg-turbo-dev libtool"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-dev $pkgname-doc"
replaces="libgphoto2-dev"
source="https://downloads.sourceforge.net/gphoto/libgphoto2-$pkgver.tar.bz2"
options="libtool"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	udevscriptdir=/lib/udev ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-drivers=all \
		--disable-static \
		--disable-rpath \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/libgphoto2/*/*.a \
		"$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
}

sha512sums="7863192c2959ffc8d771eca294adc54090192e3207cf8d3a9bf143e50034c3f1248e7fe41cad75f758ab2ad09c9258d50967b921adf3223d7c74370faa110a9e  libgphoto2-2.5.16.tar.bz2"