aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-10 07:07:33 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-10 07:07:33 +0500
commit75d79c8c37bbf4a90156030018a5e4d5dc76717c (patch)
tree5625ba5e865c4a52d3a1c24d246d36bd6a94667a /net-im/mastoposter
parentwww-apps/invidious: remove custom src_compile (diff)
downloadguru-75d79c8c37bbf4a90156030018a5e4d5dc76717c.tar.gz
guru-75d79c8c37bbf4a90156030018a5e4d5dc76717c.tar.bz2
guru-75d79c8c37bbf4a90156030018a5e4d5dc76717c.zip
net-im/mastoposter: new package, add 0.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'net-im/mastoposter')
-rw-r--r--net-im/mastoposter/Manifest1
-rw-r--r--net-im/mastoposter/files/mastoposter.confd2
-rw-r--r--net-im/mastoposter/files/mastoposter.initd16
-rw-r--r--net-im/mastoposter/files/mastoposter.service15
-rw-r--r--net-im/mastoposter/mastoposter-0.1.ebuild38
-rw-r--r--net-im/mastoposter/metadata.xml12
6 files changed, 84 insertions, 0 deletions
diff --git a/net-im/mastoposter/Manifest b/net-im/mastoposter/Manifest
new file mode 100644
index 000000000..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 000000000..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 000000000..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 000000000..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 000000000..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 000000000..c23e04d78
--- /dev/null
+++ b/net-im/mastoposter/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>cyber+gentoo@sysrq.in</email>
+ <name>Anna</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">mastoposter</remote-id>
+ <remote-id type="github">hatkidchan/mastoposter</remote-id>
+ </upstream>
+</pkgmetadata>