# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=libplist
pkgver=%version%
pkgrel=%release%
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' '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
}
