# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=uarmsolver
_pkgorig=uARMSolver
pkgver=0.3.0
pkgrel=0
pkgdesc="Universal Association Rule Mining Solver"
url="https://github.com/firefly-cpp/uARMSolver"
arch="all"
license="MIT"
makedepends="cmake samurai"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/firefly-cpp/$_pkgorig/archive/$pkgver/$_pkgorig-$pkgver.tar.gz
	fix-uint.patch
	"
builddir="$srcdir/$_pkgorig-$pkgver"
options="!check" # no tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	install -Dm755 build/uARMSolver -t "$pkgdir"/usr/bin

	install -Dm644 docs/2010.10884.pdf -t "$pkgdir"/usr/share/doc/$pkgname

	install -Dm644 docs/231.pdf -t "$pkgdir"/usr/share/doc/$pkgname

	install -Dm644 uARMSolver.1 -t "$pkgdir"/usr/share/man/man1/
}

sha512sums="
5e13f8133bee1e702f5a841f4ecf6b40e14d826a09dc25a2bb188dfc9d361b56f010c68b6b0ad8bf8571fe3397331b33a9af7d5299c8a004f5edcec1514c4304  uarmsolver-0.3.0.tar.gz
e505a474ac2f0b002685d412fbdfbb8cb62fd88c474816e2e9ecdcd5d60bd4ee2069eb390fecaa273d69291d6f8258a124d6c69e9d30a9702d09bd3efed5431b  fix-uint.patch
"
