From 88d414ece7d1c9e64ff53b86320adc04c83d7c60 Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Fri, 8 May 2020 20:20:51 -0400 Subject: [PATCH] New package: oragono-2.0.0. --- srcpkgs/oragono/files/oragono/log/run | 2 ++ srcpkgs/oragono/files/oragono/run | 6 ++++ srcpkgs/oragono/patches/paths.patch | 40 +++++++++++++++++++++++++++ srcpkgs/oragono/template | 32 +++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 srcpkgs/oragono/files/oragono/log/run create mode 100644 srcpkgs/oragono/files/oragono/run create mode 100644 srcpkgs/oragono/patches/paths.patch create mode 100644 srcpkgs/oragono/template diff --git a/srcpkgs/oragono/files/oragono/log/run b/srcpkgs/oragono/files/oragono/log/run new file mode 100644 index 00000000000..0308e8a7512 --- /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 00000000000..d1c000a5235 --- /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 00000000000..ec3ca339f48 --- /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 00000000000..8bf7d508b76 --- /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 + }