From 4cbcc855382a06088e2f016f62cafdbcb7e40665 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 20 Mar 2022 00:40:44 +0000 Subject: gentoo resync : 20.03.2022 --- net-irc/ergo/ergo-2.9.1-r1.ebuild | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 net-irc/ergo/ergo-2.9.1-r1.ebuild (limited to 'net-irc/ergo/ergo-2.9.1-r1.ebuild') diff --git a/net-irc/ergo/ergo-2.9.1-r1.ebuild b/net-irc/ergo/ergo-2.9.1-r1.ebuild new file mode 100644 index 000000000000..1b189203c307 --- /dev/null +++ b/net-irc/ergo/ergo-2.9.1-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module systemd + +DESCRIPTION="A modern IRC server written in Go" +HOMEPAGE="https://ergo.chat/ https://github.com/ergochat/ergo" +SRC_URI="https://github.com/ergochat/ergo/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 BSD-2 BSD ISC MIT MPL-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64" + +# We may even want to package irctest in future? + +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/ergo/ergo:/usr/bin/ergo:' \ + -e 's:/home/ergo:/var/lib/ergo:' \ + -e 's:/var/lib/ergo/ircd.yaml:/etc/ergo/ircd.yaml:' \ + -e 's:User=ergo:User=oragono:' \ + distrib/systemd/ergo.service || die +} + +src_compile() { + go build . || die +} + +src_install() { + einstalldocs + + dobin ergo + + insinto /etc/ergo + doins default.yaml + + # Swap back in next release? + # Forked locally for https://github.com/ergochat/ergo/issues/1914 changes + #newinitd distrib/openrc/ergo.initd ergo + #newconfd distrib/openrc/ergo.confd ergo + + newinitd "${FILESDIR}"/ergo.initd-r1 ergo + newconfd "${FILESDIR}"/ergo.confd-r1 ergo + + keepdir /var/lib/ergo + fowners oragono:oragono /var/lib/ergo + + insinto /var/lib/ergo + doins -r languages/ + + systemd_dounit distrib/systemd/ergo.service +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + elog "Please copy the example config in ${EROOT}/etc/ergo:" + elog "e.g. cp ${EROOT}/etc/ergo/default.yaml ${EROOT}/etc/ergo/ircd.yaml" + fi +} -- cgit v1.2.3