# Maintainer: 
pkgname=libcdio-paranoia
pkgver=0.94_p1
_pkgver="10.2+${pkgver/_p/+}"
pkgrel=1
pkgdesc="CD paranoia on top of libcdio"
url="https://www.gnu.org/software/libcdio/"
arch="all"
license="GPL-2.0+ AND LGPL-2.0+"
depends_dev="ncurses-dev"
makedepends="$depends_dev libcdio-dev autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="http://ftp.gnu.org/gnu/libcdio/$pkgname-$_pkgver.tar.gz"
builddir="$srcdir/$pkgname-$_pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.ac
	autoreconf -i
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	cd "$builddir"
	make check
}

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

sha512sums="9b2381491271090bac08594cb1d84de98e9f0a5afc6a2c98e9ffcf4b95addc3adcd0f0b9adeb928dfbf8178356ad6a7ccfeb048685c823d138b2af232f0b4c93  libcdio-paranoia-10.2+0.94+1.tar.gz"