diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-05-18 09:10:28 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-05-18 09:36:09 +0200 |
commit | 3b9bd5829d31679d7a26483f6b11940c1cda78fe (patch) | |
tree | 88f5d1e56ed69015ea9212bc7dd69dd39c512032 /app-misc | |
parent | app-portage/flaggie: Enable py3.10 (diff) | |
download | gentoo-3b9bd5829d31679d7a26483f6b11940c1cda78fe.tar.gz gentoo-3b9bd5829d31679d7a26483f6b11940c1cda78fe.tar.bz2 gentoo-3b9bd5829d31679d7a26483f6b11940c1cda78fe.zip |
app-misc/votrify: Modernize
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/votrify/votrify-5-r1.ebuild | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/app-misc/votrify/votrify-5-r1.ebuild b/app-misc/votrify/votrify-5-r1.ebuild new file mode 100644 index 000000000000..333d87cf357d --- /dev/null +++ b/app-misc/votrify/votrify-5-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 2019-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..9} ) + +inherit python-single-r1 + +DESCRIPTION="Tool for community verification of Gentoo elections" +HOMEPAGE="https://github.com/mgorny/votrify/" +SRC_URI=" + https://github.com/mgorny/votrify/archive/v${PV}.tar.gz + -> ${P}.tar.gz +" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +REQUIRED_USE=${PYTHON_REQUIRED_USE} + +RDEPEND=" + ${PYTHON_DEPS} + app-misc/gentoo-elections +" + +src_configure() { + # update default location for election scripts + sed -i -e "s^os.path.dirname(__file__)^'${EPREFIX}/usr/lib'^" \ + votrify-make-confirmation || die + + python_fix_shebang votrify-{make,verify}-* +} + +make_wrappers() { + local election=${1} + + newbin - "votrify-${election}-make" \ + < <(sed -e "s^@ELECTION@^${election}^" \ + votrify-wrapper-make.bash.in || die) + newbin - "votrify-${election}-verify" \ + < <(sed -e "s^@ELECTION@^${election}^" \ + votrify-wrapper-verify.bash.in || die) +} + +src_install() { + dobin votrify-{make,verify}-* + make_wrappers council-201906 + einstalldocs +} + +pkg_postinst() { + elog "In order to interactively create confirmation for Council 2019 election:" + elog " votrify-council-201906-make" + elog + elog "In order to verify the results for Council 2019 election:" + elog " votrify-council-201906-verify" +} |