# Builds a source archive required for opam release in the current directory. # The gcc-compatible snapshot is packaged as `hacl-star-raw` # The OCaml bindings are packaged as `hacl-star` # # Before using, the version number needs to be set (to the same version) in # * bindings/ocaml/hacl-star.opam # * dist/hacl-star-raw.opam # * dist/META # and make sure the files in dist have been copied in dist/gcc-compatible # # A new `ocaml-vXX` Git tag should be created and the resulting archive uploaded to GitHub as a release. # The opam-publish tool can be used to create a PR in ocaml/opam-repository to update the opam package: # `opam publish https://github.com/project-everest/hacl-star/releases/download/ocaml-vXX/hacl-star.XX.tar.gz` VERSION=$(subst version: ,,$(shell grep "^version: " ../bindings/ocaml/hacl-star.opam)) ARCHIVE=$(subst VER,$(VERSION),hacl-star.VER.tar.gz) all: release-hacl-star prepare-raw: rm -rf hacl-star && mkdir -p hacl-star && mkdir -p hacl-star/raw cp -r ../dist/gcc-compatible/* hacl-star/raw cp -r ../dist/kremlin hacl-star make -C hacl-star/raw clean cd hacl-star/raw && rm -rf lib/*.cmx lib/*.cmi lib/*.cmo lib/*.o lib_gen/*.exe lib_gen/*.cmx lib_gen/*.cmi lib_gen/*.o libocamlevercrypt.a libevercrypt.so ocamlevercrypt.* dllocamlevercrypt.so depend.ocaml config.h Makefile.config release-hacl-star: prepare-raw cp -r ../bindings/ocaml/* hacl-star mv hacl-star/raw/hacl-star-raw.opam hacl-star/ sed -i 's/make/make "-C" "raw"/g' hacl-star/hacl-star-raw.opam sed -i 's/"\.\/configure"/"sh" "-exc" "cd raw \&\& \.\/configure"/g' hacl-star/hacl-star-raw.opam cd hacl-star && dune clean cd hacl-star && tar -czvf ../$(ARCHIVE) . clean: rm -rf raw hacl-star