aboutsummaryrefslogtreecommitdiffstats
path: root/main/libmtp/APKBUILD
blob: 4383ede20766f119f70cb1cf41eed97c461cd557 (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
52
53
54
55
56
57
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmtp
pkgver=1.1.9
pkgrel=0
pkgdesc="A software library for MTP media players"
url="http://libmtp.sourceforge.net/"
arch="all"
license="LGPLv2+"
depends=""
depends_dev="libusb-compat-dev"
makedepends="$depends_dev udev-dev"
install=""
subpackages="$pkgname-dev $pkgname-examples"
source="http://download.sourceforge.net/libmtp/libmtp-$pkgver.tar.gz"

_builddir="$srcdir"/libmtp-$pkgver
prepare() {
	local i
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

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

examples() {
	pkgdesc="Example programs for libmtp"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

md5sums="d515b38a5b5d5ef235b01ebba47412df  libmtp-1.1.9.tar.gz"
sha256sums="23f1d3c0b54107388bf2824d56415e9e087c980c86e5d179865652c022b6b189  libmtp-1.1.9.tar.gz"
sha512sums="6be9f14602b05830ec01defaeb0f237ac4d021f76f4003d7178eda00d8bf86d7fbbeba0053dc111d2ab9eb32f1603c2dc4f2bc128f4cbe4819228486b9b85513  libmtp-1.1.9.tar.gz"