summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-irc/oragono/oragono-2.5.1.ebuild')
-rw-r--r--net-irc/oragono/oragono-2.5.1.ebuild64
1 files changed, 64 insertions, 0 deletions
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
+}