# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libimobiledevice
pkgver=1.3.0
pkgrel=8
pkgdesc="Library that talks iPhone and iPod Touch protocols on Linux"
url="https://libimobiledevice.org"
arch="all"
license="LGPL-2.1-or-later"
makedepends="openssl-dev>3 libusbmuxd-dev libplist-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-progs"
source="https://github.com/libimobiledevice/libimobiledevice/releases/download/$pkgver/libimobiledevice-$pkgver.tar.bz2
	libplist-2.3.0.patch
	"
prepare() {
	default_prepare
	update_config_guess
}

build() {
	export CFLAGS="$CFLAGS -Wno-error=int-conversion"
	./configure \
		--prefix=/usr \
		--disable-static \
		--without-cython
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

progs() {
	pkgdesc="Tools that talks iPhone and iPod Touch devices' protocols on Linux"
	depends=""
	amove usr/bin
}

sha512sums="
7b22040552a6561729c79c0846f571b0e608abb7c297567d2ecfdd1718ce86df08a5e34ba51f209bdee96a1917da15e7ba3aaef1d289a951d1d3470b1f89e6a8  libimobiledevice-1.3.0.tar.bz2
f6523d38394a33712bd24a3725a9cb494e8e20e20ccfd396d25cee6001372dcb6f4b0a1231b1c475441d5c5cf5e89305e141f025621631331591a3da0d7ac99d  libplist-2.3.0.patch
"
