From 914e8f724f8140a3769bf8a851f0301aab62ef5f Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Wed, 13 Oct 2021 14:00:46 -0400 Subject: [PATCH 1/2] New package: python3-async_lru-1.0.2 --- srcpkgs/python3-async_lru/template | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 srcpkgs/python3-async_lru/template diff --git a/srcpkgs/python3-async_lru/template b/srcpkgs/python3-async_lru/template new file mode 100644 index 000000000000..8e8bd45f666c --- /dev/null +++ b/srcpkgs/python3-async_lru/template @@ -0,0 +1,19 @@ +# Template file for 'python3-async_lru' +pkgname=python3-async_lru +version=1.0.2 +revision=1 +wrksrc="async_lru-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +short_desc="Simple lru_cache for asyncio" +maintainer="Joel Beckmeyer " +license="MIT" +homepage="https://github.com/aio-libs/async-lru" +distfiles="${PYPI_SITE}/a/async_lru/async_lru-${version}.tar.gz" +checksum=baa898027619f5cc31b7966f96f00e4fc0df43ba206a8940a5d1af5336a477cb +make_check=no # requires unpackaged pytest-runner + +post_install() { + vlicense LICENSE +} From 2f2434631e75566c467f298d409e38fbb8aa1dc6 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Thu, 14 Oct 2021 14:43:08 -0400 Subject: [PATCH 2/2] New package: activityrelay-0.1.0 --- .../activityrelay/files/activityrelay/log/run | 1 + srcpkgs/activityrelay/files/activityrelay/run | 4 ++ srcpkgs/activityrelay/template | 42 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 120000 srcpkgs/activityrelay/files/activityrelay/log/run create mode 100755 srcpkgs/activityrelay/files/activityrelay/run create mode 100644 srcpkgs/activityrelay/template diff --git a/srcpkgs/activityrelay/files/activityrelay/log/run b/srcpkgs/activityrelay/files/activityrelay/log/run new file mode 120000 index 000000000000..3a5b4a586051 --- /dev/null +++ b/srcpkgs/activityrelay/files/activityrelay/log/run @@ -0,0 +1 @@ +/usr/bin/vlogger \ No newline at end of file diff --git a/srcpkgs/activityrelay/files/activityrelay/run b/srcpkgs/activityrelay/files/activityrelay/run new file mode 100755 index 000000000000..1126d59b7cd7 --- /dev/null +++ b/srcpkgs/activityrelay/files/activityrelay/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +exec chpst -u _activityrelay:_activityrelay /usr/bin/python3 -m relay \ + -c /etc/activityrelay/activityrelay.yaml diff --git a/srcpkgs/activityrelay/template b/srcpkgs/activityrelay/template new file mode 100644 index 000000000000..090bec06d197 --- /dev/null +++ b/srcpkgs/activityrelay/template @@ -0,0 +1,42 @@ +# Template file for 'activityrelay' +pkgname=activityrelay +version=0.1.0 +revision=1 +wrksrc="relay-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-aiohttp python3-async-timeout python3-attrs python3-chardet + python3-idna python3-multidict python3-pycryptodome python3-yaml + python3-simplejson python3-yarl python3-cachetools python3-async_lru" +short_desc="Generic LitePub relay (works with LitePub consumers and Mastodon)" +maintainer="Joel Beckmeyer " +license="AGPL-3.0-or-later" +homepage="https://git.pleroma.social/pleroma/relay" +distfiles="https://git.pleroma.social/pleroma/relay/-/archive/${version}/relay-${version}.tar.gz" +checksum=baa43aea662ff759e98051560f2a80f40c29b83793f503c9a75a38fc13ac5d9e +conf_files="/etc/activityrelay/activityrelay.yaml" +make_check=no # no tests specified + +system_accounts="_activityrelay" +_activityrelay_homedir="/var/lib/activityrelay" + +make_dirs="/var/lib/activityrelay 0700 _activityrelay _activityrelay" + +post_patch() { + vsed -i 's,relay.jsonld,/var/lib/activityrelay/relay.jsonld,' relay.yaml.example +} + +post_install() { + vsv activityrelay + + vmkdir usr/share/activityrelay + vcopy installation/relay.caddy usr/share/activityrelay + vcopy installation/relay.nginx usr/share/activityrelay + vcopy relay.yaml.example usr/share/activityrelay + vcopy Dockerfile usr/share/activityrelay + + vmkdir etc/activityrelay + vcopy relay.yaml.example etc/activityrelay/activityrelay.yaml + + vlicense LICENSE +}