# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libplist
pkgver=2.6.0
pkgrel=1
pkgdesc='Library to handle Apple Property List files'
arch=('x86_64')
url='https://libimobiledevice.org/'
license=('LGPL-2.1-or-later')
depends=('gcc-libs' 'glibc')
makedepends=('cython' 'git' 'python' 'python-setuptools')
optdepends=('python: Python bindings')
source=("git+https://github.com/libimobiledevice/libplist.git#tag=$pkgver")
b2sums=('b122bd4ec6f0b88cf1e7159f8beff6d702d755f47624765a324c2ffb8011d834d81ff422433e87f72d3ace67f7909e9197a263dc82428e2f38d31315fc0ff2d2')

prepare() {
  cd $pkgname
  autoreconf -fi
}

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

check() {    
  cd $pkgname
  make check  
}

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