Skip to content

Commit

Permalink
ssl-cert.eclass: add EAPI 8 support
Browse files Browse the repository at this point in the history
- drop support for EAPI < 6
- add guard

Signed-off-by: Eray Aslan <[email protected]>
  • Loading branch information
erayaslan committed Sep 16, 2021
1 parent b5bf65c commit 9d7833f
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions eclass/ssl-cert.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,22 @@
# [email protected]
# @AUTHOR:
# Max Kalika <[email protected]>
# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Eclass for SSL certificates
# @DESCRIPTION:
# This eclass implements a standard installation procedure for installing
# self-signed SSL certificates.
# @EXAMPLE:
# "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}

# Guard against unsupported EAPIs. We need EAPI >= 1 for slot dependencies.
case "${EAPI:-0}" in
0)
die "${ECLASS}.eclass: EAPI=0 is not supported. Please upgrade to EAPI >= 1."
;;
1|2|3|4|5|6|7)
;;
*)
die "${ECLASS}.eclass: EAPI=${EAPI} is not supported yet."
;;
case "${EAPI}" in
6|7|8) ;;
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac

if [[ ! ${_SSL_CERT_ECLASS} ]]; then
_SSL_CERT_ECLASS=1

# @ECLASS-VARIABLE: SSL_CERT_MANDATORY
# @PRE_INHERIT
# @DESCRIPTION:
Expand Down Expand Up @@ -53,7 +49,7 @@ if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
fi

case "${EAPI}" in
1|2|3|4|5|6)
6)
DEPEND="${SSL_DEPEND}"
;;
*)
Expand Down Expand Up @@ -283,3 +279,5 @@ install_cert() {
ewarn "Some requested certificates were not generated"
fi
}

fi

0 comments on commit 9d7833f

Please sign in to comment.