* [gentoo-commits] repo/proj/guru:master commit in: net-misc/gmcapsule/, net-misc/gmcapsule/files/
@ 2024-02-16 6:38 Viorel Munteanu
0 siblings, 0 replies; only message in thread
From: Viorel Munteanu @ 2024-02-16 6:38 UTC (permalink / raw
To: gentoo-commits
commit: 96020a54a11fd91f02b9c5238bfba2af3ddfe88d
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Feb 16 01:27:36 2024 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Feb 16 01:28:53 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=96020a54
net-misc/gmcapsule: new package, add 0.6.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
net-misc/gmcapsule/Manifest | 1 +
net-misc/gmcapsule/files/gmcapsuled.confd | 2 ++
net-misc/gmcapsule/files/gmcapsuled.initd | 29 +++++++++++++++++++++
net-misc/gmcapsule/files/gmcapsuled.service | 16 ++++++++++++
net-misc/gmcapsule/gmcapsule-0.6.1.ebuild | 39 +++++++++++++++++++++++++++++
net-misc/gmcapsule/metadata.xml | 18 +++++++++++++
6 files changed, 105 insertions(+)
diff --git a/net-misc/gmcapsule/Manifest b/net-misc/gmcapsule/Manifest
new file mode 100644
index 0000000000..7c6adee140
--- /dev/null
+++ b/net-misc/gmcapsule/Manifest
@@ -0,0 +1 @@
+DIST gmcapsule-0.6.1.tar.gz 28755 BLAKE2B f20e5763fa4dfb3e3fd25f29367b415d5c1adfb54e49af243a27d6dc9b4ec84229b8cda1f6cd99a72945c25c4b2d13c238169c8708d6a6dcec527b6c810ee6d9 SHA512 ae8a3ff4ade7458c8c78eeedb60f2c5912e4366bcbe9bab3db546e9f18f3b4c8f7e59ee6ad9b7f5d25a58e98d707995757bdd343fa8723f1a3e269f37456ebb8
diff --git a/net-misc/gmcapsule/files/gmcapsuled.confd b/net-misc/gmcapsule/files/gmcapsuled.confd
new file mode 100644
index 0000000000..0206795eb2
--- /dev/null
+++ b/net-misc/gmcapsule/files/gmcapsuled.confd
@@ -0,0 +1,2 @@
+# Configuration file
+#GMCAPSULED_CONFIG="/etc/gmcapsule/config.ini"
diff --git a/net-misc/gmcapsule/files/gmcapsuled.initd b/net-misc/gmcapsule/files/gmcapsuled.initd
new file mode 100644
index 0000000000..9cd5753d51
--- /dev/null
+++ b/net-misc/gmcapsule/files/gmcapsuled.initd
@@ -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"
+}
diff --git a/net-misc/gmcapsule/files/gmcapsuled.service b/net-misc/gmcapsule/files/gmcapsuled.service
new file mode 100644
index 0000000000..bcc73d14f9
--- /dev/null
+++ b/net-misc/gmcapsule/files/gmcapsuled.service
@@ -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
diff --git a/net-misc/gmcapsule/gmcapsule-0.6.1.ebuild b/net-misc/gmcapsule/gmcapsule-0.6.1.ebuild
new file mode 100644
index 0000000000..85ce513ba3
--- /dev/null
+++ b/net-misc/gmcapsule/gmcapsule-0.6.1.ebuild
@@ -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
+}
diff --git a/net-misc/gmcapsule/metadata.xml b/net-misc/gmcapsule/metadata.xml
new file mode 100644
index 0000000000..94b29ddb3a
--- /dev/null
+++ b/net-misc/gmcapsule/metadata.xml
@@ -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>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-16 6:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 6:38 [gentoo-commits] repo/proj/guru:master commit in: net-misc/gmcapsule/, net-misc/gmcapsule/files/ Viorel Munteanu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox