# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libisoburn
pkgver=1.4.8
pkgrel=0
pkgdesc="Library to enable creation and expansion of ISO-9660 filesystems"
url="http://libburnia-project.org/"
arch="all"
license="GPL-2.0-or-later"
depends=""
depends_dev=""
makedepends="$depends_dev libburn-dev libisofs-dev acl-dev zlib-dev
	libedit-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc xorriso:_xorriso"
source="http://files.libburnia-project.org/releases/libisoburn-$pkgver.tar.gz"

builddir="$srcdir"/libisoburn-$pkgver
build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/bin/xorriso-tcltk || return 1
	ln -s xorriso "$pkgdir"/usr/bin/mkisofs
}

_xorriso() {
	pkgdesc="ISO-9660 and Rock Ridge image manipulation tool"
	replaces="cdrkit"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="26dd6f6884d98d9d3f54bf18b529a688d28aa0ff54b7fe6fe7926c7765755a1c7f7b2d0ef02ca6ea2bdac9ddf6f928c01c89a3547aea1e9f0b47346b160d0d46  libisoburn-1.4.8.tar.gz"
