summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Persson Forsberg <cat@catcream.org>2023-04-10 16:45:11 +0200
committerSam James <sam@gentoo.org>2023-04-26 05:02:46 +0100
commit18560e34f64657ce43582592ad68c00d18dab16a (patch)
tree00f675096e05489bf1387e784a9f960757ee5035 /net-irc
parentapp-doc/kicad-doc: drop 7.0.0 (diff)
downloadgentoo-18560e34f64657ce43582592ad68c00d18dab16a.tar.gz
gentoo-18560e34f64657ce43582592ad68c00d18dab16a.tar.bz2
gentoo-18560e34f64657ce43582592ad68c00d18dab16a.zip
net-irc/soju: add sqlite and moderncsqlite USE flags
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/soju/metadata.xml4
-rw-r--r--net-irc/soju/soju-0.6.0-r1.ebuild68
2 files changed, 72 insertions, 0 deletions
diff --git a/net-irc/soju/metadata.xml b/net-irc/soju/metadata.xml
index df600cfb1ced..7f2f852dba69 100644
--- a/net-irc/soju/metadata.xml
+++ b/net-irc/soju/metadata.xml
@@ -12,4 +12,8 @@
<upstream>
<remote-id type="sourcehut">~emersion/soju</remote-id>
</upstream>
+ <use>
+ <flag name="moderncsqlite">Use moderncsqlite, a cgo-free port of
+ SQLite</flag>
+ </use>
</pkgmetadata>
diff --git a/net-irc/soju/soju-0.6.0-r1.ebuild b/net-irc/soju/soju-0.6.0-r1.ebuild
new file mode 100644
index 000000000000..f95f3178e06c
--- /dev/null
+++ b/net-irc/soju/soju-0.6.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module systemd
+
+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://github.com/alfredfo/${PN}-deps/raw/master/${P}-deps.tar.xz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv"
+IUSE="moderncsqlite +sqlite pam"
+REQUIRED_USE="?? ( moderncsqlite sqlite )"
+
+BDEPEND="
+ app-text/scdoc
+"
+RDEPEND="
+ acct-user/soju
+ acct-group/soju
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.6.0-fix-dup-upstream-connections.patch
+)
+
+src_compile() {
+ if use sqlite; then
+ GOFLAGS+=" -tags=libsqlite3"
+ elif use moderncsqlite; then
+ GOFLAGS+=" -tags=moderncsqlite"
+ else
+ GOFLAGS+=" -tags=nosqlite"
+ fi
+ use pam && GOFLAGS+=" -tags=pam"
+
+ ego build ${GOFLAGS} ./cmd/soju
+ ego build ${GOFLAGS} ./cmd/sojudb
+ ego build ${GOFLAGS} ./cmd/sojuctl
+
+ scdoc <doc/soju.1.scd >doc/soju.1 || die
+}
+
+src_install() {
+ dobin soju
+ dobin sojudb
+ dobin sojuctl
+
+ doman doc/soju.1
+ systemd_dounit contrib/soju.service
+ keepdir /etc/soju
+ insinto /etc/soju
+ newins config.in config
+ newinitd "${FILESDIR}"/soju.initd soju
+ einstalldocs
+}
+
+pkg_postinst() {
+ elog "${PN} requires a user database for authenticating clients."
+ elog "As the soju user, create a database using:"
+ elog "$ sojudb -config ${EROOT}/etc/soju/config create-user <username> [-admin]"
+}