On Mon, 2025-12-15 at 16:01 +0000, James Le Cuirot wrote: > Signed-off-by: James Le Cuirot <[email protected]> > --- > eclass/branding.eclass | 85 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 85 insertions(+) > create mode 100644 eclass/branding.eclass > > diff --git a/eclass/branding.eclass b/eclass/branding.eclass > new file mode 100644 > index 000000000000..06b09f09ea4c > --- /dev/null > +++ b/eclass/branding.eclass > @@ -0,0 +1,85 @@ > +# Copyright 2025 Gentoo Authors > +# Distributed under the terms of the GNU General Public License v2 > + > +# @ECLASS: branding.eclass > +# @MAINTAINER: > +# James Le Cuirot <[email protected]> > +# @AUTHOR: > +# James Le Cuirot <[email protected]> > +# @SUPPORTED_EAPIS: 8 9 > +# @BLURB: Branding variables with Gentoo defaults > +# @DESCRIPTION: > +# This defines a set of variables for appling branding to various packages. > The > +# variables default to Gentoo values. These can be overridden by users or > +# downstream distributions. > + > +case ${EAPI} in > + 8|9) ;; > + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; > +esac > + > +# @ECLASS_VARIABLE: OS_NAME > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DESCRIPTION: > +# Corresponds to os-release's NAME. See man os-release. > +: ${OS_NAME:="Gentoo"} > + > +# @ECLASS_VARIABLE: OS_ID > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DESCRIPTION: > +# Corresponds to os-release's ID. See man os-release. > +: ${OS_ID:="gentoo"} > + > +# @ECLASS_VARIABLE: OS_ID_LIKE > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# Corresponds to os-release's ID_LIKE. See man os-release. > + > +# @ECLASS_VARIABLE: OS_HOME_URL > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DESCRIPTION: > +# Corresponds to os-release's HOME_URL. See man os-release. > +: ${OS_HOME_URL:="https://www.gentoo.org/"}
Minor nitpick maybe don't have the trailing / so just https://www.gentoo.org looks better IMO > + > +# @ECLASS_VARIABLE: OS_SUPPORT_URL > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DESCRIPTION: > +# Corresponds to os-release's SUPPORT_URL. See man os-release. > +: ${OS_SUPPORT_URL:="https://www.gentoo.org/support/"} > + > +# @ECLASS_VARIABLE: OS_BUG_REPORT_URL > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DESCRIPTION: > +# Corresponds to os-release's BUG_REPORT_URL. See man os-release. > +: ${OS_BUG_REPORT_URL:="https://bugs.gentoo.org/"} > + > +# @ECLASS_VARIABLE: OS_VERSION > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# Corresponds to os-release's VERSION. See man os-release. > + > +# @ECLASS_VARIABLE: OS_VERSION_ID > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# Corresponds to os-release's VERSION_ID. See man os-release. > + > +# @ECLASS_VARIABLE: OS_PRETTY_NAME > +# @USER_VARIABLE > +# @OUTPUT_VARIABLE > +# @DESCRIPTION: > +# Corresponds to os-release's PRETTY_NAME. See man os-release. If completely > +# unset, defaults to "Gentoo Linux". If set but blank, defaults to the > +# concatenation of OS_NAME and OS_VERSION. > +: ${OS_PRETTY_NAME="Gentoo Linux"} > +: ${OS_PRETTY_NAME:="${OS_NAME}${OS_VERSION:+ }${OS_VERSION}"}
signature.asc
Description: This is a digitally signed message part
