# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer:
pkgname=harminv
pkgver=1.4.1
pkgrel=1
pkgdesc="Free program to solve the problem of harmonic inversion"
url="https://github.com/stevengj/harminv"
arch="all"
license="GPL"
depends_dev="openblas-dev"
makedepends="$depends_dev gfortran"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/stevengj/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static --enable-shared
	make
}

check() {
	cd "$builddir"
	make check
}

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

sha512sums="30720804286e4d373bcaae5b1b8238748b3077bfd6e6afb98eba571d8acfd13d927b84d1f6ab2b975bd665063dfc533bd7a0d19f199bf51694c6d93f6c7c947c  harminv-1.4.1.tar.gz"
