summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-04 05:53:20 +0000
committerSam James <sam@gentoo.org>2021-03-04 06:00:06 +0000
commit7066f15c5858c7be840a6fc2683c09781f4fe55e (patch)
treefdda86903966413495c82f6225b1e9fe2ef0b7c6
parentacct-user/oragono: add user oragono (324) for net-irc/oragono (diff)
downloadgentoo-7066f15c5858c7be840a6fc2683c09781f4fe55e.tar.gz
gentoo-7066f15c5858c7be840a6fc2683c09781f4fe55e.tar.bz2
gentoo-7066f15c5858c7be840a6fc2683c09781f4fe55e.zip
net-irc/oragono: initial import
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-irc/oragono/Manifest1
-rw-r--r--net-irc/oragono/files/oragono.confd3
-rw-r--r--net-irc/oragono/files/oragono.initd11
-rw-r--r--net-irc/oragono/metadata.xml11
-rw-r--r--net-irc/oragono/oragono-2.5.1.ebuild64
5 files changed, 90 insertions, 0 deletions
diff --git a/net-irc/oragono/Manifest b/net-irc/oragono/Manifest
new file mode 100644
index 00000000000..90d1a81846c
--- /dev/null
+++ b/net-irc/oragono/Manifest
@@ -0,0 +1 @@
+DIST oragono-2.5.1.tar.gz 3079990 BLAKE2B 0b2c0e330cac974e311ff711b28e7f5cc5548355bcafb14fc903a63e0442e513a890f4ce890c49316603ba1dc7214d8953b3fc62f2aa40fb34e787348900de81 SHA512 684b697a97fb0274e35f8ae491841e5f8c564f778ff19294ff2353e75416e7283295668bff5db57e4950cb991ead5215c501ba1a2c517a12bbbbe85efe983bea
diff --git a/net-irc/oragono/files/oragono.confd b/net-irc/oragono/files/oragono.confd
new file mode 100644
index 00000000000..3e694bb9703
--- /dev/null
+++ b/net-irc/oragono/files/oragono.confd
@@ -0,0 +1,3 @@
+# /etc/conf.d/oragono: config file for /etc/init.d/oragono
+ORAGONO_CONFIGFILE="/etc/oragono/ircd.yaml"
+
diff --git a/net-irc/oragono/files/oragono.initd b/net-irc/oragono/files/oragono.initd
new file mode 100644
index 00000000000..2379aaea301
--- /dev/null
+++ b/net-irc/oragono/files/oragono.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+command=/usr/bin/oragono
+command_args="--conf ${ORAGONO_CONFIGFILE:-"/etc/oragono/ircd.yaml"}"
+pidfile=/var/run/oraogno.pid
+name="Oragono"
+description="Oragono IRC daemon"
+
+depend() {
+ use dns
+ provide ircd
+}
diff --git a/net-irc/oragono/metadata.xml b/net-irc/oragono/metadata.xml
new file mode 100644
index 00000000000..d03f6317175
--- /dev/null
+++ b/net-irc/oragono/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">oragono/oragono</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-irc/oragono/oragono-2.5.1.ebuild b/net-irc/oragono/oragono-2.5.1.ebuild
new file mode 100644
index 00000000000..6a7fb9b3c97
--- /dev/null
+++ b/net-irc/oragono/oragono-2.5.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit go-module systemd
+
+DESCRIPTION="A modern IRC server written in Go"
+HOMEPAGE="https://oragono.io/ https://github.com/oragono/oragono"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0 BSD-2 BSD ISC MIT MPL-2.0"
+
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND=">=dev-lang/go-1.14"
+RDEPEND="
+ acct-user/oragono
+ acct-group/oragono
+"
+
+DOCS=( README.md docs/MANUAL.md docs/USERGUIDE.md )
+
+src_prepare() {
+ default
+
+ # Minor fiddling with paths
+ sed -i \
+ -e 's:/home/oragono/oragono:/usr/bin/oragono:' \
+ -e 's:/home/oragono:/var/lib/oragono:' \
+ -e 's:/var/lib/oragono/ircd.yaml:/etc/oragono/ircd.yaml:' \
+ distrib/systemd/oragono.service || die
+}
+
+src_compile() {
+ go build -mod=vendor . || die
+}
+
+src_install() {
+ einstalldocs
+
+ dobin oragono
+
+ insinto /etc/oragono
+ doins default.yaml
+
+ newinitd "${FILESDIR}"/oragono.initd oragono
+ newconfd "${FILESDIR}"/oragono.confd oragono
+
+ keepdir /var/lib/oragono
+ fowners oragono:oragono /var/lib/oragono
+
+ insinto /var/lib/oragono
+ doins -r languages/
+
+ systemd_dounit distrib/systemd/oragono.service
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ elog "Please copy the example config in ${EROOT}/etc/oragono:"
+ elog "e.g. cp ${EROOT}/etc/oragono/default.yaml ${EROOT}/etc/oragono/ircd.yaml"
+ fi
+}