From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0758A15815E for ; Sun, 4 Feb 2024 19:32:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0A18A2BC02A; Sun, 4 Feb 2024 19:32:20 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E0AA92BC029 for ; Sun, 4 Feb 2024 19:32:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 19F3D343163 for ; Sun, 4 Feb 2024 19:32:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4456114C7 for ; Sun, 4 Feb 2024 19:32:16 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1707074778.3378f870a916cbcbe0db2706b9df3ab88f5babd8.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/rhvoice-voice.eclass X-VCS-Directories: eclass/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 3378f870a916cbcbe0db2706b9df3ab88f5babd8 X-VCS-Branch: dev Date: Sun, 4 Feb 2024 19:32:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5da5ae8d-3e44-44cd-8b6c-557e94f422d6 X-Archives-Hash: 43223a8b277285fd30cabdff7d19f6e1 commit: 3378f870a916cbcbe0db2706b9df3ab88f5babd8 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sat Feb 3 14:03:03 2024 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Sun Feb 4 19:26:18 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3378f870 rhvoice-voice.eclass: new eclass Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/rhvoice-voice.eclass | 102 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/eclass/rhvoice-voice.eclass b/eclass/rhvoice-voice.eclass new file mode 100644 index 0000000000..796019f21d --- /dev/null +++ b/eclass/rhvoice-voice.eclass @@ -0,0 +1,102 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: rhvoice-voice.eclass +# @MAINTAINER: +# Anna +# @AUTHOR: +# Anna +# @SUPPORTED_EAPIS: 8 +# @BLURB: eclass for packaging RHVoice voices +# @DESCRIPTION: +# An eclass streamlining the construction of ebuilds for the officially +# supported RHVoice voices. +# +# Look at "copyright" files to identify voice's license. +# @EXAMPLE: +# +# Most ebuilds will look like this: +# +# @CODE +# +# EAPI=8 +# +# RHVOICE_VOICE="arina" +# RHVOICE_VOICE_REPO="arina-rus" +# RHVOICE_VOICE_L10N="ru" +# inherit rhvoice-voice +# +# LICENSE="CC-BY-NC-ND-4.0" +# +# @CODE + +case ${EAPI} in + 8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ ! ${_RHVOICE_VOICE_ECLASS} ]]; then +_RHVOICE_VOICE_ECLASS=1 + +# @ECLASS_VARIABLE: RHVOICE_VOICE +# @PRE_INHERIT +# @REQUIRED +# @DESCRIPTION: +# Voice name (see "data/voices" in RHVoice source code). + +# @ECLASS_VARIABLE: RHVOICE_VOICE_L10N +# @PRE_INHERIT +# @REQUIRED +# @DESCRIPTION: +# Language name in L10N USE_EXPAND syntax. + +if [[ ! ${RHVOICE_VOICE} ]]; then + die "RHVOICE_VOICE must be set before inherit" +fi + +if [[ ! ${RHVOICE_VOICE_L10N} ]]; then + die "RHVOICE_VOICE_L10N must be set before inherit" +fi + +# @ECLASS_VARIABLE: RHVOICE_VOICE_REPO +# @PRE_INHERIT +# @DESCRIPTION: +# Repository name under the RHVoice GitHub organization. +: "${RHVOICE_VOICE_REPO:=${RHVOICE_VOICE:?}}" + +# @ECLASS_VARIABLE: RHVOICE_VOICE_TAG +# @PRE_INHERIT +# @DESCRIPTION: +# Tag name for generating SRC_URI. +: "${RHVOICE_VOICE_TAG:=${PV}}" + +# @ECLASS_VARIABLE: RHVOICE_VOICE_DISTFILE +# @PRE_INHERIT +# @DESCRIPTION: +# Distfile name for generating SRC_URI, should be a ZIP archive. +: "${RHVOICE_VOICE_DISTFILE:=data.zip}" + +DESCRIPTION="RHVoice voice: ${RHVOICE_VOICE:?} (${RHVOICE_VOICE_L10N:?})" +HOMEPAGE="https://github.com/RHVoice/${RHVOICE_VOICE_REPO:?}" +SRC_URI="https://github.com/RHVoice/${RHVOICE_VOICE_REPO}/releases/download/${RHVOICE_VOICE_TAG}/${RHVOICE_VOICE_DISTFILE} -> ${P}.zip" +S="${WORKDIR}" + +KEYWORDS="~amd64 ~x86" +SLOT="0" + +RDEPEND="app-accessibility/rhvoice-core[l10n_${RHVOICE_VOICE_L10N}]" +BDEPEND="app-arch/unzip" + +# @FUNCTION: rhvoice-voice_src_install +# @DESCRIPTION: +# Install the voice. +rhvoice-voice_src_install() { + debug-print-function ${FUNCNAME} "${@}" + + insinto /usr/share/RHVoice/voices/${RHVOICE_VOICE:?} + doins -r . +} + +fi + +EXPORT_FUNCTIONS src_install