# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Hugo Doria <hugodoria@gmail.com>
# Contributor: Bjorn Martensen

pkgname=libisofs
pkgver=1.5.8.2
_pkgver=$(echo $pkgver | sed -e 's/\.\([0-9]*.\)$/.pl0\1/')
pkgrel=1
pkgdesc='Library to pack up hard disk files and directories into a ISO 9660 disk image'
arch=(x86_64 aarch64)
url='https://dev.lovelyhq.com/libburnia/libisofs'
license=(GPL-2.0-or-later)
depends=(glibc acl zlib)
makedepends=(git)
source=("$pkgname::git+$url#tag=release-${_pkgver}")
sha512sums=('c942c7d327889d3e4c6cd414e6fdf2509ee10305d7afdaccb733a0301163fa6ad4dcd14776e6575de324dd7b362c1a62b8270604aca6d3999077d6112f2d2d49')
b2sums=('897e2b0a9231bfe42081cf9780d62c63148d63e0d97523deb4867ce83ebd3896754a28aec2f50f5d8312570346e978f6cdeccf8209800f2e5971e5d1196e1b37')

prepare() {
  cd "$pkgname"

  autoreconf -vfi
}

build() {
  cd "$pkgname"

  ./configure \
    --prefix=/usr \
    --enable-libacl \
    --enable-xattr \
    --disable-static

  make
}

package() {
  cd "$pkgname"

  make DESTDIR="$pkgdir" install
}
