aboutsummaryrefslogtreecommitdiff
path: root/net-libs/meta-srht
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2023-01-07 13:15:03 -0500
committerJulien Roy <julien@jroy.ca>2023-01-07 13:15:03 -0500
commit55126e134cf456fe2eb58f4e93e58fa2c0076d7a (patch)
treec361d6f9a99103379b81dda018fcaa8912162726 /net-libs/meta-srht
parentafb53491cdaaa0f5715e92b20a1dc12c59eab665 (diff)
downloadMrRoy-Overlay-55126e134cf456fe2eb58f4e93e58fa2c0076d7a.tar.gz
MrRoy-Overlay-55126e134cf456fe2eb58f4e93e58fa2c0076d7a.tar.bz2
MrRoy-Overlay-55126e134cf456fe2eb58f4e93e58fa2c0076d7a.zip
net-libs/meta-srht: add 0.63.5, drop 0.63.5
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'net-libs/meta-srht')
-rw-r--r--net-libs/meta-srht/Manifest1
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-api.confd2
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-api.initd15
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-api.service12
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-daily.service8
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-daily.timer9
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-webhooks.initd15
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht-webhooks.service12
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht.confd2
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht.cron4
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht.initd15
-rw-r--r--net-libs/meta-srht/files/meta.sr.ht.service12
-rw-r--r--net-libs/meta-srht/meta-srht-0.63.5.ebuild73
-rw-r--r--net-libs/meta-srht/metadata.xml17
14 files changed, 197 insertions, 0 deletions
diff --git a/net-libs/meta-srht/Manifest b/net-libs/meta-srht/Manifest
new file mode 100644
index 0000000..5fb8784
--- /dev/null
+++ b/net-libs/meta-srht/Manifest
@@ -0,0 +1 @@
+DIST meta-srht-0.63.5.tar.gz 740640 BLAKE2B 46d696e13d5cae2a732712d49acfd654cf074558f00ab5dce5531e82862a5bba70987a76ac21e193b6f82cfb295e718628305a5b3f3af1cd0208ec9cba1f8c93 SHA512 9680ea121b43dafa336df75bc037004af5055d2767be038729ba3e0c93323f34fe0ff375a21b9d42bacd0baacc7f2dae53ace0f8cd15441cb79f70c417f2b842
diff --git a/net-libs/meta-srht/files/meta.sr.ht-api.confd b/net-libs/meta-srht/files/meta.sr.ht-api.confd
new file mode 100644
index 0000000..9f22d1f
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht-api.confd
@@ -0,0 +1,2 @@
+ADDRESS=0.0.0.0
+PORT=5100 \ No newline at end of file
diff --git a/net-libs/meta-srht/files/meta.sr.ht-api.initd b/net-libs/meta-srht/files/meta.sr.ht-api.initd
new file mode 100644
index 0000000..6280e78
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht-api.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="meta.sr.ht API daemon"
+description=""
+command="/usr/bin/metasrht-api"
+command_args="-b ${ADDRESS}:${PORT}"
+command_user="srht:srht"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+}
diff --git a/net-libs/meta-srht/files/meta.sr.ht-api.service b/net-libs/meta-srht/files/meta.sr.ht-api.service
new file mode 100644
index 0000000..1341c65
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht-api.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=meta.sr.ht API service
+After=network.target
+
+[Service]
+Type=simple
+User=srht
+Restart=always
+ExecStart=/usr/bin/metasrht-api -b :5100
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-libs/meta-srht/files/meta.sr.ht-daily.service b/net-libs/meta-srht/files/meta.sr.ht-daily.service
new file mode 100644
index 0000000..a2d9516
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht-daily.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=meta.sr.ht job
+After=network.target
+
+[Service]
+Type=oneshot
+User=srht
+ExecStart=/usr/bin/metasrht-daily
diff --git a/net-libs/meta-srht/files/meta.sr.ht-daily.timer b/net-libs/meta-srht/files/meta.sr.ht-daily.timer
new file mode 100644
index 0000000..2462204
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht-daily.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Daily meta.sr.ht job
+
+[Timer]
+OnCalendar=daily
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd b/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd
new file mode 100644
index 0000000..a1a42e5
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht-webhooks.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="meta.sr.ht webhooks daemon"
+description=""
+command="/usr/bin/celery"
+command_args="-A metasrht.webhooks worker --loglevel=INFO"
+command_user="srht:srht"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+}
diff --git a/net-libs/meta-srht/files/meta.sr.ht-webhooks.service b/net-libs/meta-srht/files/meta.sr.ht-webhooks.service
new file mode 100644
index 0000000..24c3b82
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht-webhooks.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=meta.sr.ht webhooks service
+After=network.target
+
+[Service]
+Type=simple
+User=srht
+Restart=always
+ExecStart=/usr/bin/celery -A metasrht.webhooks worker --loglevel=INFO
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-libs/meta-srht/files/meta.sr.ht.confd b/net-libs/meta-srht/files/meta.sr.ht.confd
new file mode 100644
index 0000000..8113c8e
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht.confd
@@ -0,0 +1,2 @@
+BINDADDRESS=0.0.0.0
+PORT=5000 \ No newline at end of file
diff --git a/net-libs/meta-srht/files/meta.sr.ht.cron b/net-libs/meta-srht/files/meta.sr.ht.cron
new file mode 100644
index 0000000..f271a9a
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht.cron
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+su - srht -s /bin/sh -c /usr/bin/metasrht-daily
+exit $?
diff --git a/net-libs/meta-srht/files/meta.sr.ht.initd b/net-libs/meta-srht/files/meta.sr.ht.initd
new file mode 100644
index 0000000..0728798
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="meta.sr.ht daemon"
+description=""
+command="/usr/bin/gunicorn"
+command_args="metasrht.app:app -b ${ADDRESS}:${PORT}"
+command_user="srht:srht"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+}
diff --git a/net-libs/meta-srht/files/meta.sr.ht.service b/net-libs/meta-srht/files/meta.sr.ht.service
new file mode 100644
index 0000000..c18e540
--- /dev/null
+++ b/net-libs/meta-srht/files/meta.sr.ht.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=meta.sr.ht website service
+After=network.target
+
+[Service]
+Type=simple
+User=srht
+Restart=always
+ExecStart=/usr/bin/gunicorn metasrht.app:app -b 0.0.0.0:5000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-libs/meta-srht/meta-srht-0.63.5.ebuild b/net-libs/meta-srht/meta-srht-0.63.5.ebuild
new file mode 100644
index 0000000..a5ad94f
--- /dev/null
+++ b/net-libs/meta-srht/meta-srht-0.63.5.ebuild
@@ -0,0 +1,73 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..10} )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1 go-module optfeature systemd
+
+DESCRIPTION="The central authentication and account service for sr.ht"
+HOMEPAGE="https://git.sr.ht/~sircmpwn/meta.sr.ht"
+SRC_URI="http://git.sr.ht/~sircmpwn/meta.sr.ht/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="network-sandbox"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ acct-user/srht
+ acct-group/srht
+ dev-python/dnspython[${PYTHON_USEDEP}]
+ dev-python/bcrypt[${PYTHON_USEDEP}]
+ dev-python/django-markdownify[${PYTHON_USEDEP}]
+ dev-python/core-srht[${PYTHON_USEDEP}]
+ dev-python/qrcode[${PYTHON_USEDEP}]
+ dev-python/redis-py[${PYTHON_USEDEP}]
+ dev-python/python-sshpubkeys[${PYTHON_USEDEP}]
+ dev-python/zxcvbn[${PYTHON_USEDEP}]
+ www-servers/gunicorn[${PYTHON_USEDEP}]
+"
+BDEPEND="net-libs/nodejs
+ dev-lang/sassc
+ dev-lang/go
+"
+
+S="${WORKDIR}/meta.sr.ht-${PV}"
+
+src_unpack() {
+ default_src_unpack
+}
+
+src_compile() {
+ distutils-r1_src_compile
+ cd "${S}/api" || die
+ ego build -o metasrht-api
+}
+
+src_install() {
+ distutils-r1_src_install
+ insinto "/etc/sr.ht/"
+ newins "${S}/config.example.ini" "config.example.meta.sr.ht.ini"
+ exeinto "/etc/cron.daily"
+ dobin "${S}/api/metasrht-api"
+ dodir "/etc/sr.ht"
+ doexe "${FILESDIR}/meta.sr.ht.cron"
+ newinitd "${FILESDIR}/meta.sr.ht.initd" "meta.sr.ht"
+ newconfd "${FILESDIR}/meta.sr.ht.confd" "meta.sr.ht"
+ newinitd "${FILESDIR}/meta.sr.ht-api.initd" "meta.sr.ht-api"
+ newconfd "${FILESDIR}/meta.sr.ht-api.confd" "meta.sr.ht-api"
+ newinitd "${FILESDIR}/meta.sr.ht-webhooks.initd" "meta.sr.ht-webhooks"
+ systemd_dounit "${FILESDIR}/meta.sr.ht.service"
+ systemd_dounit "${FILESDIR}/meta.sr.ht-api.service"
+ systemd_dounit "${FILESDIR}/meta.sr.ht-webhooks.service"
+ systemd_dounit "${FILESDIR}/meta.sr.ht-daily.service"
+ systemd_dounit "${FILESDIR}/meta.sr.ht-daily.timer"
+}
+
+plg_postinst() {
+ optfeature "billing support" "dev-python/stripe dev-python/weasyprint"
+ optfeature "daily maintenance" "virtual/cron"
+}
diff --git a/net-libs/meta-srht/metadata.xml b/net-libs/meta-srht/metadata.xml
new file mode 100644
index 0000000..83d6e1e
--- /dev/null
+++ b/net-libs/meta-srht/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>julien@jroy.ca</email>
+ <name>Julien Roy</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <name>Drew DeVault</name>
+ <email>sir@cmpwn.com</email>
+ </maintainer>
+ <changelog>https://git.sr.ht/~sircmpwn/meta.sr.ht/refs</changelog>
+ <doc>https://man.sr.ht/meta.sr.ht/</doc>
+ <remote-id type="sourcehut">meta.sr.ht</remote-id>
+ </upstream>
+</pkgmetadata>