diff --git a/ocaml/trexio/Makefile b/ocaml/trexio/Makefile index 91d0b69..e5be1ca 100644 --- a/ocaml/trexio/Makefile +++ b/ocaml/trexio/Makefile @@ -6,4 +6,7 @@ lib/trexio.ml: ../../trex.json read_json.py src/trexio.ml src/trexio.mli src/tre sources: lib/trexio.ml +clean: + dune clean + .PHONY: sources default diff --git a/ocaml/trexio/compile-lib.sh b/ocaml/trexio/compile-lib.sh index ecc44b3..71d3455 100755 --- a/ocaml/trexio/compile-lib.sh +++ b/ocaml/trexio/compile-lib.sh @@ -1,6 +1,7 @@ #!/bin/sh PREFIX=$1 +TASK=$2 PKGCONFIG_COMMAND="pkg-config --libs --cflags trexio" INSTALLED="no" @@ -16,10 +17,15 @@ if eval $PKGCONFIG_COMMAND >/dev/null 2>&1; then fi # Compile C library -cd vendor -tar -zxf trexio-*.tar.gz -cd trexio-* -./configure --prefix=${PREFIX} -$(MAKE) install && \ -rm -rf trexio-*/ - +set -e +if test "$TASK" = "build" ; then + tar -zxf trexio-*.tar.gz + cd trexio-* + ./configure --prefix=${PREFIX} + make -j 4 + cd ../ +elif test "$TASK" = "install" ; then + cd trexio-* + make install + rm -rf trexio-*/ +fi diff --git a/ocaml/trexio/trexio-2.3.2.tar.gz b/ocaml/trexio/trexio-2.3.2.tar.gz new file mode 100644 index 0000000..8fa17bb Binary files /dev/null and b/ocaml/trexio/trexio-2.3.2.tar.gz differ diff --git a/ocaml/trexio/trexio.opam b/ocaml/trexio/trexio.opam index 0d96b93..95dd208 100644 --- a/ocaml/trexio/trexio.opam +++ b/ocaml/trexio/trexio.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "2.3.0" +version: "2.3.2" synopsis: "Binding for the TREXIO Input/Output library" description: "TREXIO is a file format and library for storing wave functions and integrals for quantum chemistry." @@ -20,9 +20,15 @@ depends: [ "conf-pkg-config" {build} "odoc" {with-doc} ] +depexts: [ + ["hdf5"] {os-distribution = "alpine"} + ["epel-release" "hdf5-devel"] {os-distribution = "centos"} + ["libhdf5-dev"] {os-distribution = "debian"} + ["hdf5"] {os-distribution = "homebrew"} + ["libhdf5-dev"] {os-distribution = "ubuntu"} +] build: [ ["dune" "subst"] {dev} - ["./compile-lib.sh" "%{prefix}%" "build"] [ "dune" "build" @@ -35,8 +41,4 @@ build: [ "@doc" {with-doc} ] ] -install: [ - ["./compile-lib.sh" "%{prefix}%" "install"] - ["dune" "install"] -] dev-repo: "git+https://github.com/trex-coe/trexio_ocaml.git"