Skip to content

Commit

Permalink
New package: activityrelay-0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TinfoilSubmarine committed Oct 25, 2021
1 parent 914e8f7 commit c4c0f50
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions srcpkgs/activityrelay/files/activityrelay/log/run
4 changes: 4 additions & 0 deletions 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
42 changes: 42 additions & 0 deletions srcpkgs/activityrelay/template
@@ -0,0 +1,42 @@
# Template file for 'activityrelay'
pkgname=activityrelay
version=0.1.0
revision=1
build_style=python3-module
wrksrc="relay-${version}"
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 <joel@beckmeyer.us>"
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
}

0 comments on commit c4c0f50

Please sign in to comment.