diff --git a/srcpkgs/oragono/files/oragono/log/run b/srcpkgs/oragono/files/oragono/log/run new file mode 100644 index 0000000000..0308e8a751 --- /dev/null +++ b/srcpkgs/oragono/files/oragono/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec vlogger -t oragono diff --git a/srcpkgs/oragono/files/oragono/run b/srcpkgs/oragono/files/oragono/run new file mode 100644 index 0000000000..22e850aa39 --- /dev/null +++ b/srcpkgs/oragono/files/oragono/run @@ -0,0 +1,6 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +exec 2>&1 +exec chpst -u _oragono:_oragono oragono run --conf /etc/oragono.conf diff --git a/srcpkgs/oragono/patches/paths.patch b/srcpkgs/oragono/patches/paths.patch new file mode 100644 index 0000000000..ec3ca339f4 --- /dev/null +++ b/srcpkgs/oragono/patches/paths.patch @@ -0,0 +1,40 @@ +--- oragono.yaml 2020-05-08 19:12:48.553961721 -0400 ++++ oragono.yaml 2020-05-08 19:15:15.970211218 -0400 +@@ -45,8 +45,8 @@ + # The standard SSL/TLS port for IRC is 6697. This will listen on all interfaces: + ":6697": + tls: +- key: tls.key +- cert: tls.crt ++ key: /var/lib/oragono/tls.key ++ cert: /var/lib/oragono/tls.crt + # 'proxy' should typically be false. It's only for Kubernetes-style load + # balancing that does not terminate TLS, but sends an initial PROXY line + # in plaintext. +@@ -149,7 +149,7 @@ + + # motd filename + # if you change the motd, you should move it to ircd.motd +- motd: oragono.motd ++ motd: /var/lib/oragono/motd + + # motd formatting codes + # if this is true, the motd is escaped using formatting codes like $c, $b, and $i +@@ -668,7 +668,7 @@ + # datastore configuration + datastore: + # path to the datastore +- path: ircd.db ++ path: /var/lib/oragono/db + + # if the database schema requires an upgrade, `autoupgrade` will attempt to + # perform it automatically on startup. the database will be backed +@@ -696,7 +696,7 @@ + default: en + + # which directory contains our language files +- path: languages ++ path: /usr/share/oragono/i18n/ + + # limits - these need to be the same across the network + limits: diff --git a/srcpkgs/oragono/template b/srcpkgs/oragono/template new file mode 100644 index 0000000000..1505453f1f --- /dev/null +++ b/srcpkgs/oragono/template @@ -0,0 +1,32 @@ +# Template file for 'oragono' +pkgname=oragono +version=2.0.0 +revision=1 +build_style=go +go_import_path="github.com/oragono/oragono" +hostmakedepends="git" +short_desc="Modern IRC server (daemon/ircd) written in Go" +maintainer="Peter Bui " +license="MIT" +homepage="https://oragono.io/" +distfiles="https://github.com/oragono/oragono/archive/v${version}.tar.gz" +checksum=b86094a9383c029f5a1328be097a028ea9a15343c109f55f0c91cca9f5236df4 +conf_files="/etc/oragono.conf" +system_accounts="_oragono" +_oragono_homedir="/var/lib/oragono" +make_dirs=" + /var/lib/oragono 0755 _oragono _oragono" + + post_install() { + vlicense LICENSE + + vinstall oragono.yaml 644 etc oragono.conf + + vmkdir usr/share/${pkgname} + vcopy oragono.motd usr/share/${pkgname}/default.motd + + vmkdir usr/share/${pkgname}/i18n + vcopy "languages/*" usr/share/${pkgname}/i18n/ + + vsv oragono + }