#!/usr/bin/env modbuild

pbuild::pre_configure() {
	:
}

pbuild::configure() {
	CC=$MPICC
	CXX=$MPICXX
	F77=$MPIF77
	F90=$MPIF90
	FC=$MPIFC
	FORTRAN=$MPIFORTRAN
	"${MODULE_SRCDIR}"/configure \
		--prefix="${PREFIX}" \
		--enable-netcdf-4 \
		--with-pic \
		|| exit 1
}

pbuild::add_to_group 'HDF5'
pbuild::set_runtime_dependencies "${COMPILER}" "${MPI}" 'hdf5'
pbuild::set_build_dependencies   "${COMPILER}" "${MPI}" 'hdf5'
pbuild::set_docfiles 'COPYRIGHT' 'README.md' 'RELEASE_NOTES.md'
pbuild::make_all

