# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=libimobiledevice-glue
pkgver=1.3.0
pkgrel=1
pkgdesc='A library with common code used by libraries and tools around the libimobiledevice project'
arch=('x86_64' 'aarch64')
url='https://libimobiledevice.org/'
license=('LGPL-2.1-or-later')
depends=('glibc' 'libplist')
makedepends=('git')
source=("git+https://github.com/libimobiledevice/libimobiledevice-glue.git#tag=$pkgver")
b2sums=('a132cbfee3d0acf6506555d1c6ddfda0775fcb51c8161c7c2f485c95d37a87d77a675f8a7671e151779bef1a81f155a726e5c85a27cca636d522b0b804fbbe01')

prepare() {
  cd $pkgname
  autoreconf -fi
}

build() (
  cd $pkgname
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
)

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