summaryrefslogtreecommitdiff
path: root/main/libgphoto2/APKBUILD
blob: c4c220cc9297017e95255b1cbd6c6ba1ecbd6a27 (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
46
47
48
49
50
51
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgphoto2
pkgver=2.5.10
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="http://downloads.sourceforge.net/gphoto/libgphoto2-$pkgver.tar.bz2
	libjpeg_turbo_1.5.0_fix.patch"
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
}

md5sums="f1e53e684a3ea51cc7958d7e4eee7f37  libgphoto2-2.5.10.tar.bz2
af8318eb34e73b30ccdb4f7357ce7a63  libjpeg_turbo_1.5.0_fix.patch"
sha256sums="8d8668d432ba595c7466442aec2cf553bdf8782ec171291dbc65717c633a4ef2  libgphoto2-2.5.10.tar.bz2
36723efa91099b14d3eff83acc90071d3453317dc1dd6fa114bfb76826f49184  libjpeg_turbo_1.5.0_fix.patch"
sha512sums="13f593e09e8428bf72fc783b4ddfd5fc418fcf42ebe17d05b44255458dbac956293fb189c48b609fba5586f39771d148a3541fa484ac51fd68c921f2f05ca18a  libgphoto2-2.5.10.tar.bz2
b775bd47b5eef4171f4d030d9f55c0e9e1ac4c81678195f04d0af7fc1fb4780ed271ac8a22b73384aacfa6e2f81b795c4a0d37bceb993648bd34877404af6554  libjpeg_turbo_1.5.0_fix.patch"