summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Persson Forsberg <cat@catcream.org>2022-10-17 18:31:45 +0200
committerSam James <sam@gentoo.org>2022-12-14 00:22:30 +0000
commit4b15dafee38fd8cda22d6a8743fa7d248bc588ea (patch)
treef4f847070a0f45f6701daf5770f56139edd97c3d /net-irc/soju
parentacct-group/soju: new package, add 0 (diff)
downloadgentoo-4b15dafee38fd8cda22d6a8743fa7d248bc588ea.tar.gz
gentoo-4b15dafee38fd8cda22d6a8743fa7d248bc588ea.tar.bz2
gentoo-4b15dafee38fd8cda22d6a8743fa7d248bc588ea.zip
net-irc/soju: new package, add 0.5.2
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org> Closes: https://github.com/gentoo/gentoo/pull/27449 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-irc/soju')
-rw-r--r--net-irc/soju/Manifest2
-rw-r--r--net-irc/soju/files/soju.initd30
-rw-r--r--net-irc/soju/metadata.xml12
-rw-r--r--net-irc/soju/soju-0.5.2.ebuild54
4 files changed, 98 insertions, 0 deletions
diff --git a/net-irc/soju/Manifest b/net-irc/soju/Manifest
new file mode 100644
index 000000000000..89ec9362ebc9
--- /dev/null
+++ b/net-irc/soju/Manifest
@@ -0,0 +1,2 @@
+DIST soju-0.5.2-deps.tar.xz 144017976 BLAKE2B 09be5c159d8c5a12bef9fe52e1d7d4883e3a3ebc8f1131fadd33808588413db9d318eb4be589f9e088d4d6257b47b8c5fa61373a872bae3b9f6570a390312972 SHA512 4f33185ee8fb7a1969ea5c2de82d9ecd7f5f7795f890ec35d87c557e973a53f93c22ecccc1b02ba47dc52d1d6528b7e18fe43fc88cb77ab4615bafe5c70ae8bd
+DIST soju-0.5.2.tar.gz 141911 BLAKE2B 3fb9455a55d8fc0a1da17303156f43cc989f601d0dc837b795a32fa4be14a45571edbc2067159990fd72c75a44c71b52a579ed01572aae43c39ebaf143d502e1 SHA512 2ee9abf9d989a6cc361350bcaa94ff78bf45119c507142d6200684c79c4e1418d0f895931d0889a6f9f15f07d7b5969e2d34ae235034f3a53f04e2bf997dc85f
diff --git a/net-irc/soju/files/soju.initd b/net-irc/soju/files/soju.initd
new file mode 100644
index 000000000000..db6069e85c5f
--- /dev/null
+++ b/net-irc/soju/files/soju.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+name="soju"
+description="User-friendly IRC bouncer"
+
+: ${command_args:="-config /etc/soju/config"}
+: ${error_log:=/var/log/soju.log}
+
+command=/usr/bin/soju
+command_user=soju:soju
+directory="/var/lib/$RC_SVCNAME"
+
+extra_started_commands="reload"
+description_reload="Reload TLS certificate"
+
+depend() {
+ need net localmount
+}
+
+start_pre() {
+ checkpath -d -o $command_user "$directory"
+ checkpath -f -o $command_user "$error_log"
+}
+
+reload() {
+ ebegin "Reloading TLS certificate"
+ $supervisor $RC_SVCNAME --signal HUP
+ eend $?
+}
diff --git a/net-irc/soju/metadata.xml b/net-irc/soju/metadata.xml
new file mode 100644
index 000000000000..d8299f5a010f
--- /dev/null
+++ b/net-irc/soju/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" proxied="yes">
+ <email>cat@catcream.org</email>
+ <name>Alfred Persson</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-irc/soju/soju-0.5.2.ebuild b/net-irc/soju/soju-0.5.2.ebuild
new file mode 100644
index 000000000000..38c2fe241f2f
--- /dev/null
+++ b/net-irc/soju/soju-0.5.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module
+
+DESCRIPTION="soju is a user-friendly IRC bouncer"
+HOMEPAGE="https://soju.im/"
+SRC_URI="https://git.sr.ht/~emersion/${PN}/refs/download/v${PV}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+IUSE="sqlite"
+
+BDEPEND="
+ app-text/scdoc
+"
+RDEPEND="
+ acct-user/soju
+ acct-group/soju
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ GOFLAGS+=" -tags=$(usex sqlite libsqlite3 nosqlite)"
+
+ ego build ${GOFLAGS} ./cmd/soju
+ ego build ${GOFLAGS} ./cmd/sojuctl
+
+ scdoc <doc/soju.1.scd >doc/soju.1
+}
+
+src_install() {
+ dobin soju
+ dobin sojuctl
+
+ doman doc/soju.1
+ keepdir /etc/soju
+ insinto /etc/soju
+ newins config.in config
+ newinitd "${FILESDIR}"/soju.initd soju
+ einstalldocs
+}
+
+pkg_postinst() {
+ elog "${P} requires a user database for authenticating bouncer users,"
+ elog "please create a user using:"
+ elog "# sojuctl -config ${EROOT}/etc/soju/config create-user <username> [-admin]"
+ elog "then set ${EROOT}/var/lib/soju/main.db owner and group to soju:soju."
+}