net-im/mastoposter: new package, add 0.1

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova 2023-05-10 07:07:33 +05:00
parent 3426ef5bf7
commit 75d79c8c37
No known key found for this signature in database
GPG Key ID: E7B76EDC50864BB1
6 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST mastoposter-0.1.tar.gz 36352 BLAKE2B e0710ce461f3d2b21ea7e3aee0e698a9db90523f9ab598868b602f028951251e6ac69cca9f1dfe9b6a66432a8c0f01d32871327b4e064eed2c3b530ae3c4c153 SHA512 77d834503e25f41b4c92ef2538ee8b3a1143d4927e5f96c0ce53d3a3f5c4a004f05c3392d43d8c4af187fc91a044ccec22f9083ccffb31ba5902f254723577ec

View File

@ -0,0 +1,2 @@
# Configuration file
#MASTOPOSTER_CONFIG_FILE="/etc/mastoposter/config.ini"

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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>