# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=libewf
pkgver=20171104
pkgrel=0
pkgdesc="Library to support the Expert Witness Compression Format"
url="http://libewf.sourceforge.net"
arch="all"
license="LGPL-2.0-or-later"
depends=""
depends_dev="zlib-dev bzip2-dev libressl-dev util-linux-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/libyal/libewf/releases/download/$pkgver/$pkgname-experimental-$pkgver.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	# fix build on gcc6
	export CFLAGS="$CFLAGS -std=gnu89"
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--disable-nls \
		|| return 1
	make || return 1
}

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

sha512sums="610174971b8e09385f1f51c02e7be36e7a18d21f8b22ddeb7ba7d5c20e7df97591a70de3523b2d63bed8deb5a2a170a14e825f6a80aeb0937553ecae5925ee0b  libewf-experimental-20171104.tar.gz"
