# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Tom Gundersen <teg@jklm.no>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Gabriel Martinez < reitaka at gmail dot com >

pkgname=libplist
pkgver=2.4.0
pkgrel=1
pkgdesc='Library to handle Apple Property List files'
arch=('x86_64' 'aarch64')
url='https://libimobiledevice.org/'
license=('LGPL-2.1-or-later')
depends=('gcc-libs' 'glibc')
makedepends=('cython' 'python')
optdepends=('python: Python bindings')
source=("https://github.com/libimobiledevice/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.bz2")
sha256sums=('3f5868ae15b117320c1ff5e71be53d29469d4696c4085f89db1975705781a7cd')

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

check() {    
  cd $pkgname-$pkgver
  make check  
}

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