nitter: new ptrcport

This commit is contained in:
psykose 2022-05-28 07:44:20 +00:00
parent bf53650fd4
commit 3eeae38211
Signed by: psykose
SSH key fingerprint: SHA256:HwlGVJNLZqHoOvMtkshyGaXLkcdbEJahYMlepHFL+Uk
3 changed files with 72 additions and 0 deletions

41
nitter/APKBUILD Normal file
View file

@ -0,0 +1,41 @@
# Maintainer: psykose <alice@ayaya.dev>
pkgname=nitter
pkgver=0_git20220513
_gitrev=683c052036b268028f0ecae020a1519bc586516d
pkgrel=0
pkgdesc="Alternative Twitter front-end "
url="https://github.com/zedeus/nitter/"
arch="all"
license="AGPL-3.0-only"
makedepends="libsass-dev nimble"
pkgusers="nitter"
pkggroups="nitter"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="https://github.com/zedeus/nitter/archive/$_gitrev/nitter-$_gitrev.tar.gz
nitter.initd
"
builddir="$srcdir/$pkgname-$_gitrev"
options="!check"
build() {
nimble -y build -d:release
nimble -y scss
}
package() {
depends="redis"
install -Dm755 nitter -t "$pkgdir"/usr/bin
install -Dm755 "$srcdir"/nitter.initd "$pkgdir"/etc/init.d/nitter
install -Dm640 nitter.example.conf -t"$pkgdir"/var/lib/nitter
cp -a public "$pkgdir"/var/lib/nitter
chown -R nitter:nitter "$pkgdir"/var/lib/nitter
}
sha512sums="
9b804f686c4c6c0c11de93b3fbef3246df7133f9fc62c4dd73f33d8ec5709df1d8ee8eb8be26c0a4541b25bab60bf762c317855c2f0fc94e22a257182d52e65f nitter-683c052036b268028f0ecae020a1519bc586516d.tar.gz
7382562f40e50d13ba16adf17eb86b58b365474934bb33cbddf9117d4cc7ff12da9186edb01fd3c13b4efd91e35e57f368f056b376d03b4d5c6a191971a07ace nitter.initd
"

22
nitter/nitter.initd Normal file
View file

@ -0,0 +1,22 @@
#!/sbin/openrc-run
depend() {
use net
after firewall
need redis
}
supervisor=supervise-daemon
name=nitter
description="nitter"
command=/usr/bin/nitter
directory=/var/lib/nitter
command_background=true
output_log=/var/log/nitter.log
error_log=/var/log/nitter.log
command_user=nitter:nitter
start_pre() {
checkpath -f -o $command_user /var/log/nitter.log
}

View file

@ -0,0 +1,9 @@
#!/bin/sh
user=nitter
group=nitter
addgroup -S $group 2>/dev/null
adduser -S -D -h /var/lib/$user -s /sbin/nologin -G $group -g $user $user 2>/dev/null
exit 0