From 9eed0df5792f098fa00ec811b42cb7adbab7cd33 Mon Sep 17 00:00:00 2001 From: Kye Shi Date: Mon, 21 Jun 2021 14:28:15 -0700 Subject: [PATCH 1/4] new package: dune-2.8.5 --- srcpkgs/dune/template | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 srcpkgs/dune/template diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template new file mode 100644 index 000000000000..c8a78e86a3c3 --- /dev/null +++ b/srcpkgs/dune/template @@ -0,0 +1,19 @@ +# Template file for 'dune' +pkgname=dune +version=2.8.5 +revision=1 +build_style="gnu-makefile" +make_build_target="release" +makedepends="ocaml" +short_desc="Composable build system for OCaml" +maintainer="Kye Shi " +license="MIT" +homepage="https://dune.build/" +distfiles="https://github.com/ocaml/dune/archive/refs/tags/$version.tar.gz" +checksum="35ea0326509d6964b4b0f56b86e88cba9b3304f9b6e6322fe98257f73a57fc30" +nocross="yes" + +post_install() { + mv -t "$DESTDIR/usr/share" "$DESTDIR/usr"/{doc,man} + vlicense "LICENSE.md" +} From bd95b8dfcf6f3d42f6015c69bb9674d8ecc2bd12 Mon Sep 17 00:00:00 2001 From: Kye Shi Date: Mon, 21 Jun 2021 17:25:26 -0700 Subject: [PATCH 2/4] common: add `dune` build-style --- common/build-style/dune.sh | 22 ++++++++++++++++++++++ common/environment/build-style/dune.sh | 1 + 2 files changed, 23 insertions(+) create mode 100644 common/build-style/dune.sh create mode 100644 common/environment/build-style/dune.sh diff --git a/common/build-style/dune.sh b/common/build-style/dune.sh new file mode 100644 index 000000000000..9d6e0b7f1075 --- /dev/null +++ b/common/build-style/dune.sh @@ -0,0 +1,22 @@ +# +# This helper is for templates using OCaml's dune build system. +# +do_build() { + dune build $make_build_args @install +} + +do_check() { + dune runtest +} + +do_install() { + dune install --prefix '/usr' --destdir "$DESTDIR" $make_install_args $make_install_target + if [ -e "$DESTDIR/usr/doc" ]; then + mkdir -p "$DESTDIR/usr/share" + mv "$DESTDIR/usr/doc" "$DESTDIR/usr/share" + fi + if [ -e "$DESTDIR/usr/man" ]; then + mkdir -p "$DESTDIR/usr/share" + mv "$DESTDIR/usr/man" "$DESTDIR/usr/share" + fi +} diff --git a/common/environment/build-style/dune.sh b/common/environment/build-style/dune.sh new file mode 100644 index 000000000000..36cf08537c55 --- /dev/null +++ b/common/environment/build-style/dune.sh @@ -0,0 +1 @@ +hostmakedepends+=" ocaml dune" From 2a8c7f834b08373541cb83c6f425eb03b8bbca55 Mon Sep 17 00:00:00 2001 From: Kye Shi Date: Mon, 21 Jun 2021 17:26:28 -0700 Subject: [PATCH 3/4] new package: ocaml-csexp-1.5.1 --- srcpkgs/ocaml-csexp/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/ocaml-csexp/template diff --git a/srcpkgs/ocaml-csexp/template b/srcpkgs/ocaml-csexp/template new file mode 100644 index 000000000000..9507f7a10ce9 --- /dev/null +++ b/srcpkgs/ocaml-csexp/template @@ -0,0 +1,17 @@ +# Template file for 'ocaml-csexp' +pkgname=ocaml-csexp +version=1.5.1 +revision=1 +wrksrc="csexp-$version" +build_style="dune" +short_desc="Minimal support for Canonical S-expressions" +maintainer="Kye Shi " +license="MIT" +homepage="https://opam.ocaml.org/packages/csexp/" +distfiles="https://github.com/ocaml-dune/csexp/archive/refs/tags/$version.tar.gz" +checksum="ffab41b0b0f65ade305043205229a7649591195cbe86e24f2c254e9dc5b14a34" +nocross="yes" + +post_install() { + vlicense "LICENSE.md" +} From 791ff3dc09e30e71ae5de65c0410e3f441465946 Mon Sep 17 00:00:00 2001 From: Kye Shi Date: Mon, 21 Jun 2021 17:26:41 -0700 Subject: [PATCH 4/4] new package: ocaml-dune-configurator-2.8.5 --- srcpkgs/ocaml-dune-configurator/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/ocaml-dune-configurator/template diff --git a/srcpkgs/ocaml-dune-configurator/template b/srcpkgs/ocaml-dune-configurator/template new file mode 100644 index 000000000000..47de83684ab0 --- /dev/null +++ b/srcpkgs/ocaml-dune-configurator/template @@ -0,0 +1,20 @@ +# Template file for 'ocaml-dune-configurator' +pkgname=ocaml-dune-configurator +version=2.8.5 +revision=1 +wrksrc="dune-$version" +build_style="dune" +make_build_args="-p dune-configurator" +make_install_target="dune-configurator" +makedepends="ocaml-csexp" +short_desc="Helper library for gathering system information" +maintainer="Kye Shi " +license="MIT" +homepage="https://dune.build/" +distfiles="https://github.com/ocaml/dune/archive/refs/tags/$version.tar.gz" +checksum="35ea0326509d6964b4b0f56b86e88cba9b3304f9b6e6322fe98257f73a57fc30" +nocross="yes" + +post_install() { + vlicense "LICENSE.md" +}