commit: 75d79c8c37bbf4a90156030018a5e4d5dc76717c
Author: Anna (cybertailor) Vyalkova sysrq in>
AuthorDate: Wed May 10 02:07:33 2023 +
Commit: Anna Vyalkova sysrq in>
CommitDate: Wed May 10 02:07:33 2023 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=75d79c8c
net-im/mastoposter: new package, add 0.1
Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in>
net-im/mastoposter/Manifest | 1 +
net-im/mastoposter/files/mastoposter.confd | 2 ++
net-im/mastoposter/files/mastoposter.initd | 16
net-im/mastoposter/files/mastoposter.service | 15 +++
net-im/mastoposter/mastoposter-0.1.ebuild| 38
net-im/mastoposter/metadata.xml | 12 +
6 files changed, 84 insertions(+)
diff --git a/net-im/mastoposter/Manifest b/net-im/mastoposter/Manifest
new file mode 100644
index 0..e32696a75
--- /dev/null
+++ b/net-im/mastoposter/Manifest
@@ -0,0 +1 @@
+DIST mastoposter-0.1.tar.gz 36352 BLAKE2B
e0710ce461f3d2b21ea7e3aee0e698a9db90523f9ab598868b602f028951251e6ac69cca9f1dfe9b6a66432a8c0f01d32871327b4e064eed2c3b530ae3c4c153
SHA512
77d834503e25f41b4c92ef2538ee8b3a1143d4927e5f96c0ce53d3a3f5c4a004f05c3392d43d8c4af187fc91a044ccec22f9083ccffb31ba5902f254723577ec
diff --git a/net-im/mastoposter/files/mastoposter.confd
b/net-im/mastoposter/files/mastoposter.confd
new file mode 100644
index 0..1458da339
--- /dev/null
+++ b/net-im/mastoposter/files/mastoposter.confd
@@ -0,0 +1,2 @@
+# Configuration file
+#MASTOPOSTER_CONFIG_FILE="/etc/mastoposter/config.ini"
diff --git a/net-im/mastoposter/files/mastoposter.initd
b/net-im/mastoposter/files/mastoposter.initd
new file mode 100644
index 0..0057cddc4
--- /dev/null
+++ b/net-im/mastoposter/files/mastoposter.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# shellcheck shell=sh
+
+command="/usr/bin/mastoposter"
+command_args="${MASTOPOSTER_CONFIG_FILE:=/etc/mastoposter/config.ini}"
+command_background=1
+pidfile="/run/${RC_SVCNAME}.pid"
+output_log="/var/log/${RC_SVCNAME}.log"
+error_log="${output_log}"
+
+depend() {
+ need net
+}
diff --git a/net-im/mastoposter/files/mastoposter.service
b/net-im/mastoposter/files/mastoposter.service
new file mode 100644
index 0..095626e7b
--- /dev/null
+++ b/net-im/mastoposter/files/mastoposter.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Configurable reposter from Mastodon-compatible Fediverse servers
+After=network.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/mastoposter /etc/mastoposter/config.ini
+Restart=always
+RestartSec=5
+StandardOutput=journal
+StandardError=inherit
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-im/mastoposter/mastoposter-0.1.ebuild
b/net-im/mastoposter/mastoposter-0.1.ebuild
new file mode 100644
index 0..c490eae74
--- /dev/null
+++ b/net-im/mastoposter/mastoposter-0.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+DISTUTILS_USE_PEP517=flit
+inherit distutils-r1 pypi systemd
+
+DESCRIPTION="Configurable reposter from Mastodon-compatible Fediverse servers"
+HOMEPAGE="
+ https://pypi.org/project/mastoposter/
+ https://github.com/hatkidchan/mastoposter
+"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+ dev-python/emoji[${PYTHON_USEDEP}]
+ dev-python/httpx[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/websockets[${PYTHON_USEDEP}]
+"
+
+src_install() {
+ distutils-r1_src_install
+
+ systemd_dounit "${FILESDIR}"/mastoposter.service
+ newinitd "${FILESDIR}"/mastoposter.initd mastoposter
+ newconfd "${FILESDIR}"/mastoposter.confd mastoposter
+
+ insinto /etc/mastoposter
+ insopts --mode 600
+ doins config.ini
+}
diff --git a/net-im/mastoposter/metadata.xml b/net-im/mastoposter/metadata.xml
new file mode 100644
index 0..c23e04d78
--- /dev/null
+++ b/net-im/mastoposter/metadata.xml
@@ -0,0 +1,12 @@
+
+https://www.gentoo.org/dtd/metadata.dtd;>
+
+
+ cyber+gen...@sysrq.in
+ Anna
+
+
+ mastoposter
+ hatkidchan/mastoposter
+
+