2 # - verify the gpg signature (fooasc) against key
3 # 1958 E634 BA58 0D63 9E4B 1EF6 AC26 8762 CB21 AF4D
4 # available from https://keybase.io/altgr/pgp_keys.asc
5 # - generate the hash with `openssl dgst -sha512 foo'
7 # We separately store the hash to be sure we're getting the exact same
8 # build, not just any tarball.
10 # This also avoids the need to depend on gpg in the installation.
11 include(HPHPFunctions)
13 SET_HHVM_THIRD_PARTY_SOURCE_ARGS(
16 "https://github.com/ocaml/opam/releases/download/2.1.0/opam-2.1.0-x86_64-linux"
18 "https://github.com/ocaml/opam/releases/download/2.1.0/opam-2.1.0-x86_64-macos"
20 "SHA512=03c6a85f13a452749fdb2271731f3624a3993498ff2b304123231a8f2b26ccf1182d12119466e9a85f4de370fca51bd61d0eefe6280d3ca087cf4620fdc59a22"
22 "SHA512=1c9acee545c851dd3701229e3a6aa7b5650620e37e01400d797a4b1fbeeb614adc459411283684e223a72fda8b14ba6c6e5482661485f888819f6a2a02e4d279"
25 include(ExternalProject)
29 DOWNLOAD_NO_EXTRACT ON
33 install -m755 "<DOWNLOADED_FILE>" "<INSTALL_DIR>/opam"
36 ExternalProject_Get_Property(opamDownload INSTALL_DIR)
37 get_filename_component(OPAM_EXECUTABLE "${INSTALL_DIR}/opam" ABSOLUTE)
39 add_executable(opam IMPORTED GLOBAL)
40 add_dependencies(opam opamDownload)
41 set_property(TARGET opam PROPERTY IMPORTED_LOCATION "${OPAM_EXECUTABLE}")