# Maintainer: Michael R. Taylor <michael@atomic.city>

pkgname=xorriso
pkgver=1.5.6
pkgrel=1
pkgdesc="xorriso copies files from POSIX filesystems into Rock Ridge enhanced ISO 9660 filesystems and allows manipulation of such filesystems"
arch=('i686' 'x86_64')
url="https://www.gnu.org/software/xorriso/"
msys2_references=(
  "anitya: 13270"
)
license=('spdx:GPL-3.0-or-later')
depends=('libbz2' 'libreadline' 'zlib' 'libiconv')
makedepends=('libbz2-devel' 'libreadline-devel' 'zlib-devel' 'autotools' 'gcc' 'libiconv-devel')
source=("https://www.gnu.org/software/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.sig})
sha256sums=('d4b6b66bd04c49c6b358ee66475d806d6f6d7486e801106a47d331df1f2f8feb'
            'SKIP')
validpgpkeys=('44BC9FD0D688EB007C4DD029E9CBDFC0ABC0A854') # Thomas Schmitt <scdbackup@gmx.net>

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  autoreconf -fiv
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  export MSYSTEM=CYGWIN
  ./configure \
    --host="${CHOST}" \
    --build="${CHOST}" \
    --prefix=/usr \
    --enable-shared \
    --disable-static
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR=${pkgdir} install
}
