#!/usr/bin/env modbuild
#

pbuild:set_download_url "http://www.netlib.org/$P/$P-$V-CMAKE.tgz"

pbuild::configure() {
	cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX \
		"${SRC_DIR}" \
		|| exit 1
}

pbuild::install() {
	mkdir -p "${PREFIX}/include"
	mkdir -p "${PREFIX}/lib"
	install -m 0644 "${BUILD_DIR}/F2CLIBS/libf2c/libf2c.a" "${PREFIX}/lib"
	install -m 0644 "${BUILD_DIR}/SRC/liblapack.a" "${PREFIX}/lib"
}

pbuild::add_to_group 'Compiler'
pbuild::install_docfiles 'COPYING'
pbuild::make_all

