From 852f21a69093e0f0c069380a78832ee920960bb6 Mon Sep 17 00:00:00 2001 From: Petr Cizmar Date: Tue, 10 Jan 2023 14:30:16 +0100 Subject: [PATCH] New package: nostr-rs-relay --- srcpkgs/nostr-rs-relay/INSTALL | 7 ++++++ .../nostr-rs-relay/files/nostr-rs-relay/run | 5 +++++ srcpkgs/nostr-rs-relay/template | 22 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 srcpkgs/nostr-rs-relay/INSTALL create mode 100644 srcpkgs/nostr-rs-relay/files/nostr-rs-relay/run create mode 100644 srcpkgs/nostr-rs-relay/template diff --git a/srcpkgs/nostr-rs-relay/INSTALL b/srcpkgs/nostr-rs-relay/INSTALL new file mode 100644 index 000000000000..58317b3914b4 --- /dev/null +++ b/srcpkgs/nostr-rs-relay/INSTALL @@ -0,0 +1,7 @@ +# INSTALL +case "$ACTION" in +post) + DBDIR=/var/db/nostr-rs-relay + mkdir $DBDIR + chown _nostr:_nostr $DBDIR +esac diff --git a/srcpkgs/nostr-rs-relay/files/nostr-rs-relay/run b/srcpkgs/nostr-rs-relay/files/nostr-rs-relay/run new file mode 100644 index 000000000000..6b7dab484e98 --- /dev/null +++ b/srcpkgs/nostr-rs-relay/files/nostr-rs-relay/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +exec \ + chpst -u _nostr:_nostr \ + nostr-rs-relay -c /etc/nostr-rs-relay.toml -d /var/db/nostr-rs-relay/ 2>&1 diff --git a/srcpkgs/nostr-rs-relay/template b/srcpkgs/nostr-rs-relay/template new file mode 100644 index 000000000000..8ed75add3ab5 --- /dev/null +++ b/srcpkgs/nostr-rs-relay/template @@ -0,0 +1,22 @@ +# Template file for 'nostr-rs-relay' +pkgname=nostr-rs-relay +version=0.8.9 +revision=1 +build_style=cargo +hostmakedepends="pkg-config protobuf" +makedepends="openssl-devel" +short_desc="Nostr relay" +maintainer="Petr Cizmar " +license="MIT" +homepage="https://git.sr.ht/~gheartsfield/nostr-rs-relay" +changelog="https://git.sr.ht/~gheartsfield/nostr-rs-relay/refs" +distfiles="https://git.sr.ht/~gheartsfield/nostr-rs-relay/archive/${version}.tar.gz" +checksum=a497340760fc99745fdb42c7ea04013d25bc57e50ca4749887129361866a98fa +system_accounts="_nostr" +system_groups="_nostr" + +post_install() { + vlicense "LICENSE" + vconf config.toml nostr-rs-relay.toml + vsv nostr-rs-relay +}