# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=hivex
pkgver=1.3.23
pkgrel=5
pkgdesc="System for extracting the contents of Windows Registry"
url="https://libguestfs.org/"
arch="all"
license="LGPL-2.1"
makedepends="gettext-dev libxml2-dev readline-dev perl-dev"
checkdepends="bash"
subpackages="$pkgname-dev $pkgname-doc"
source="https://libguestfs.org/download/hivex/hivex-$pkgver.tar.gz"

# secfixes:
#   1.3.19-r2:
#     - CVE-2021-3504

build() {
	./configure \
		--bindir=/usr/bin \
		--libdir=/usr/lib \
		--prefix=/usr \
		--disable-rpath \
		--disable-perl \
		--disable-ruby \
		--disable-ocaml \
		--disable-python \
		--disable-static
	make
}

check() {
	make check
}

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

sha512sums="
068fe81a442c8045bf9d98f0c6b782330141d8f1e104a0f191c04a2cff25ee6396c2c4777c107d595a471eb4bcbee903400c9f7946cae036165ac201587f861e  hivex-1.3.23.tar.gz
"