diff --git a/ocaml.yaml b/ocaml.yaml new file mode 100644 index 000000000000..9178408ffd6d --- /dev/null +++ b/ocaml.yaml @@ -0,0 +1,88 @@ +package: + name: ocaml + version: 5.0.0 + epoch: 0 + description: "The core OCaml system: compilers, runtime system, base libraries" + copyright: + - license: LGPL-2.1-or-later-WITH-linking-exception + +environment: + contents: + packages: + - wolfi-base + - busybox + - ca-certificates-bundle + - build-base + - gdbm-dev + - ncurses-dev + - zlib-dev + - binutils-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/ocaml/ocaml + tag: ${{package.version}} + expected-commit: e86f9e5d41217e8c824455206e854072b803b170 + + - runs: | + ./configure \ + --host ${{host.triplet.gnu}} \ + --build ${{host.triplet.gnu}} \ + --target ${{host.triplet.gnu}} \ + --prefix /usr \ + --bindir /usr/bin \ + --libdir /usr/lib/ocaml \ + --mandir /usr/share/man \ + CC="${CC:-gcc}" \ + AS="${CC:-gcc} -c" \ + ASPP="${CC:-gcc} -c" + + - uses: autoconf/make + with: + opts: world.opt + + - uses: autoconf/make-install + + - runs: | + cd ${{targets.destdir}} + # Remove annotation files and sources. + find usr/lib/ocaml \ + \( -name '*.cmt' -o -name '*.cmti' -o -name '*.ml' \) \ + -a -delete + + # To be consistent with other binaries. + mv usr/bin/ocamldoc usr/bin/ocamldoc.byte + ln -s ocamldoc.opt usr/bin/ocamldoc + + - uses: strip + +subpackages: + - name: ocamldoc + pipeline: + - runs: | + mkdir -p ${{targets.subpkgdir}}/usr/bin + mkdir -p ${{targets.subpkgdir}}/usr/lib/ocaml + mv ${{targets.destdir}}/usr/bin/ocamldoc ${{targets.subpkgdir}}/usr/bin/ + mv ${{targets.destdir}}/usr/lib/ocaml/ocamldoc ${{targets.subpkgdir}}/usr/lib/ocaml/ + + - name: "ocaml-dev" + description: "headers for ocaml" + pipeline: + - runs: | + mkdir -p ${{targets.subpkgdir}}/usr/bin + mv ${{targets.destdir}}/usr/bin/*.byte ${{targets.subpkgdir}}/usr/bin + dependencies: + runtime: + - ocaml + + - name: "ocaml-compiler-libs" + pipeline: + - runs: | + mkdir -p "${{targets.subpkgdir}}"/usr/lib + mv ${{targets.destdir}}/usr/lib/ocaml/compiler-libs "${{targets.subpkgdir}}"/usr/lib + +update: + enabled: true + github: + identifier: ocaml/ocaml diff --git a/packages.txt b/packages.txt index cf54101a75b3..b3be1de8edf0 100644 --- a/packages.txt +++ b/packages.txt @@ -860,4 +860,5 @@ esbuild ruff oranda sudo-rs +ocaml jwt-tool