app-misc/votrify: Package the election verification tool
authorMichał Górny <mgorny@gentoo.org>
Wed, 10 Jul 2019 20:13:30 +0000 (22:13 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 10 Jul 2019 20:13:35 +0000 (22:13 +0200)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
app-misc/votrify/Manifest [new file with mode: 0644]
app-misc/votrify/metadata.xml [new file with mode: 0644]
app-misc/votrify/votrify-1.ebuild [new file with mode: 0644]

diff --git a/app-misc/votrify/Manifest b/app-misc/votrify/Manifest
new file mode 100644 (file)
index 0000000..20f81a5
--- /dev/null
@@ -0,0 +1 @@
+DIST votrify-1.tar.gz 6936 BLAKE2B 7c9a5668842c5b1783e5c8b2341d42aa21257b96a82210c16e44bee8f71b690c7dba5acf48a39beff0189106db1fe141ef1ec30d68f25573a19a53c12618d346 SHA512 14fdb4ee185d96f416b47df7b29175cebc6e003aca7c1faf927b258f7dbe39b7ed69c4defb25900c6856b6e9abde3b03a69ca02152755d8532708b6cfb7f51a0
diff --git a/app-misc/votrify/metadata.xml b/app-misc/votrify/metadata.xml
new file mode 100644 (file)
index 0000000..0319eec
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>mgorny@gentoo.org</email>
+               <name>Michał Górny</name>
+       </maintainer>
+</pkgmetadata>
diff --git a/app-misc/votrify/votrify-1.ebuild b/app-misc/votrify/votrify-1.ebuild
new file mode 100644 (file)
index 0000000..f067073
--- /dev/null
@@ -0,0 +1,36 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+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"
+IUSE=""
+
+RDEPEND="app-misc/gentoo-elections"
+
+src_configure() {
+       # update default location for election scripts
+       sed -i -e "s^os.path.dirname(__file__)^'${EPREFIX}/usr/lib'^" \
+               make-confirmation.py || die
+
+       # update script names
+       sed -i -e 's:\(./\)\?\(make-confirmation\|verify-confirmations\).py:votrify-\2:g' \
+               README.rst || die
+
+       python_fix_shebang *.py
+}
+
+src_install() {
+       newbin make-confirmation.py votrify-make-confirmation
+       newbin verify-confirmations.py votrify-verify-confirmations
+       einstalldocs
+}