summaryrefslogtreecommitdiffstats
path: root/main/libmtp/APKBUILD
blob: af6165b96446cde026dbce148436dc85a0f6c00b (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmtp
pkgver=1.1.1
pkgrel=1
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 libiconv-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"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --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="073e1c2a00ba377f68dce47727e185ae  libmtp-1.1.1.tar.gz"