makedepends=(cython autoconf-archive python-setuptools)

description="A library to handle Apple Property List format whereas it's binary or XML"
url="http://libimobiledevice.org/"

packager="Great-OS Team"
maintainer="Great-OS Team"

name=libplist
version=2.7.0
release=2

PKGMK_KEEP_SOURCES="no"
source=(https://github.com/libimobiledevice/$name/releases/download/$version/$name-$version.tar.bz2)

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

package() {
  cd $name-$version
  make DESTDIR=$PKG install
  install -D -m644 cython/plist.pxd $PKG/usr/include/plist/cython/plist.pxd
}
