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

pkgname=xorriso
pkgver=1.5.0
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/"
license=('GPL3')
depends=('libbz2' 'libreadline' 'zlib')
makedepends=('libbz2-devel' 'libreadline-devel' 'zlib-devel')
source=("https://www.gnu.org/software/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.sig}
        001-msysize.patch)
sha256sums=('a93fa7ae5bb1902198cddfec25201388156932f36f2f5da829bf4fcae9a6062b'
            'SKIP'
            '211fe3fcf0663b88aa7350c917fd1670f32116dcd163132806e4eb2a73492a8a')
validpgpkeys=('E9CBDFC0ABC0A854') # Thomas Schmitt <scdbackup@gmx.net>

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ${srcdir}/001-msysize.patch

  touch NEWS
  autoreconf -fiv
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure \
      --prefix=/usr \
      --enable-shared \
      --disable-static
  make
}

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