name=cryptsetup
version=2.8.1
release=1
desc="LUKS disk encryption"
url="https://gitlab.com/cryptsetup/cryptsetup"
license="GPL-2.0-or-later"
depend="glibc libressl util-linux-libs json-c argon2 popt"
makedepend=""
source="https://kernel.org/pub/linux/utils/cryptsetup/v2.8/cryptsetup-2.8.1.tar.xz"
sha256="SKIP"

build() {
	cd "cryptsetup-2.8.1"
	_opts="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib"
	_help=$(./configure --help 2>/dev/null)
	case "$_help" in *--disable-static*)  _opts="$_opts --disable-static" ;; esac
	case "$_help" in *--disable-nls*)     _opts="$_opts --disable-nls" ;; esac
	case "$_help" in *--disable-asciidoc*) _opts="$_opts --disable-asciidoc" ;; esac
	case "$_help" in *--disable-ssh-token*) _opts="$_opts --disable-ssh-token" ;; esac
	./configure $_opts
	make -j"$JOBS"
}

package() {
	cd "cryptsetup-2.8.1"
	make DESTDIR="$pkgdir" install
}
