net-misc/gmcapsule: new package, add 0.6.1

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova 2024-02-16 06:27:36 +05:00
parent 79e249f6ef
commit 96020a54a1
No known key found for this signature in database
GPG Key ID: E7B76EDC50864BB1
6 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST gmcapsule-0.6.1.tar.gz 28755 BLAKE2B f20e5763fa4dfb3e3fd25f29367b415d5c1adfb54e49af243a27d6dc9b4ec84229b8cda1f6cd99a72945c25c4b2d13c238169c8708d6a6dcec527b6c810ee6d9 SHA512 ae8a3ff4ade7458c8c78eeedb60f2c5912e4366bcbe9bab3db546e9f18f3b4c8f7e59ee6ad9b7f5d25a58e98d707995757bdd343fa8723f1a3e269f37456ebb8

View File

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

View File

@ -0,0 +1,29 @@
#!/sbin/openrc-run
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# shellcheck shell=sh
extra_started_commands="reload"
command="/usr/bin/gmcapsuled"
command_args="-c ${GMCAPSULED_CONFIG:=/etc/gmcapsule/config.ini}"
command_user="gemini:gemini"
command_background=1
pidfile="/run/gmcapsuled.pid"
output_logger="logger -p daemon.info -t gmcapsuled --"
error_logger="logger -p daemon.err -t gmcapsuled --"
depend() {
use logger
need net
}
start_pre() {
export PYTHONUNBUFFERED=1
}
reload() {
ebegin "Refreshing gmcapsuled's configuration"
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
eend $? "Failed to reload gmcapsuled"
}

View File

@ -0,0 +1,16 @@
[Unit]
Description=GmCapsule: extensible Gemini/Titan server
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/gmcapsuled -c /etc/gmcapsule/config.ini
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
Environment="PYTHONUNBUFFERED=1"
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=gmcapsule
[Install]
WantedBy=default.target

View File

@ -0,0 +1,39 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_USE_PEP517=hatchling
inherit distutils-r1 pypi systemd
DESCRIPTION="Extensible Gemini/Titan server"
HOMEPAGE="
https://pypi.org/project/gmcapsule/
https://codeberg.org/skyjake/gmcapsule
"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
acct-user/gemini
>=dev-python/pyopenssl-21
"
python_install() {
rm "${BUILD_DIR}/install$(python_get_sitedir)"/*.ini || die
distutils-r1_python_install
}
src_install() {
distutils-r1_src_install
newinitd "${FILESDIR}"/gmcapsuled.initd gmcapsuled
newconfd "${FILESDIR}"/gmcapsuled.confd gmcapsuled
systemd_dounit "${FILESDIR}"/gmcapsuled.service
insinto /etc/gmcapsule
newins example.ini config.example.ini
}

View File

@ -0,0 +1,18 @@
<?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>
<maintainer>
<name>Jaakko Keränen</name>
<email>jaakko.keranen@iki.fi</email>
</maintainer>
<remote-id type="codeberg">skyjake/gmcapsule</remote-id>
<remote-id type="pypi">gmcapsule</remote-id>
<doc>https://geminispace.org/gmcapsule/gmcapsule.html</doc>
<bugs-to>https://codeberg.org/skyjake/gmcapsule/issues</bugs-to>
</upstream>
</pkgmetadata>