opam-version: "2.0"
maintainer: "David Sheets <sheets@alum.mit.edu>"
authors: ["The OpenSSL Project"]
bug-reports: "https://github.com/ocaml/opam-repository/issues"
homepage: "https://www.openssl.org/"
license: "Apache-1.0"
build: [
  ["pkg-config" "openssl"]
    {os != "freebsd" & os != "openbsd" & os != "netbsd"} # libssl is provided by base system on BSDs
]
depends: [
  "conf-pkg-config" {build}
]
depexts: [
  ["libssl-dev"] {os-family = "debian"}
  ["openssl-devel"] {os-distribution = "centos"}
  ["openssl-devel"] {os-distribution = "ol"}
  ["openssl-devel"] {os-distribution = "fedora"}
  ["openssl"] {os = "macos" & os-distribution = "homebrew"}
  ["openssl"] {os = "macos" & os-distribution = "macports"}
  ["openssl-dev"] {os-distribution = "alpine"}
  ["openssl"] {os-distribution = "nixos"}
  ["openssl"] {os-distribution = "arch"}
  ["libopenssl-devel"] {os-family = "suse"}
]
post-messages: [
  "Make sure libssl/openssl is installed and accessible using pkg-config." {failure}
  "Set the PKG_CONFIG_PATH environment variable if necessary." {failure}
  "For example: export PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig" {failure & os-distribution = "homebrew"}
  "For example: export PKG_CONFIG_PATH=$HOME/.nix-profile/lib/pkgconfig" {failure & os-distribution = "nixos"}
  "For example: export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig" {failure & os-distribution = "macports"}
]
synopsis: "Virtual package relying on an OpenSSL library system installation"
description:
  "This package can only install if the OpenSSL library is installed on the system."
flags: conf
