# Contributor: Vansh Singh Ruhela <vsruhela@proton.me>
# Maintainer: Vansh Singh Ruhela <vsruhela@proton.me>
pkgname=noqtis
pkgver=0.1.3
pkgrel=0
pkgdesc="Post-quantum signing, KEMs and sealed input records in C11"
url="https://github.com/rootcoder007/noqtis"
arch="all"
license="Apache-2.0 WITH LLVM-exception"
makedepends="cmake samurai"
subpackages="$pkgname-dev $pkgname-doc
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion"
source="https://github.com/rootcoder007/noqtis/releases/download/v$pkgver/noqtis-$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DNQSHARED=ON \
		-DNQWERROR=OFF
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm644 LICENSE NOTICE -t "$pkgdir"/usr/share/licenses/$pkgname
}

sha512sums="
c9539d8dc0245662e69f8a6f06534bd6bd8eae4fce548e2cd23bd096d0f339e2383dc2c45080fef00fd360865c15244dac5b1d70d15320894dc040b58d0f5864  noqtis-0.1.3.tar.gz
"
