# Maintainer:

pkgname=libtatsu
pkgver=1.0.5
pkgrel=1
pkgdesc="Library handling the communication with Apple's Tatsu Signing Server (TSS)"
arch=(x86_64 aarch64)
url='https://libimobiledevice.org/'
license=(LGPL-2.1-or-later)
depends=(
  curl
  glibc
  libplist
)
makedepends=(
  git
)
source=(
  "git+https://github.com/libimobiledevice/libtatsu.git#tag=$pkgver"
)
sha256sums=('467fa0d76b8d4bef18a7f1ce71c45cf4613289da18a4f153ae404e3b4737613c')

prepare() {
  cd $pkgname
  autoreconf -fiv
}

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

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