diff options
Diffstat (limited to 'net-irc/soju/soju-0.5.2.ebuild')
-rw-r--r-- | net-irc/soju/soju-0.5.2.ebuild | 54 |
1 files changed, 54 insertions, 0 deletions
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." +} |