1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 20:35:44 +01:00

Improve OCaml installation

This commit is contained in:
Anthony Scemama 2023-06-21 14:56:47 +02:00
parent 701690e415
commit 8b8d85c428
4 changed files with 24 additions and 13 deletions

View File

@ -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

View File

@ -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

Binary file not shown.

View File

@ -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"