mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/autobrr: new aport
This commit is contained in:
parent
bcab1c4f22
commit
a62a5eb7e9
52
testing/autobrr/APKBUILD
Normal file
52
testing/autobrr/APKBUILD
Normal file
@ -0,0 +1,52 @@
|
||||
# Contributor: Fabricio Silva <hi@fabricio.dev>
|
||||
# Maintainer: Fabricio Silva <hi@fabricio.dev>
|
||||
pkgname=autobrr
|
||||
pkgver=1.24.1
|
||||
pkgrel=0
|
||||
pkgdesc="The modern download automation tool for torrents"
|
||||
url="https://autobrr.com/"
|
||||
arch="x86_64 aarch64 armv7"
|
||||
# in next version
|
||||
license="GPL-2.0-or-later"
|
||||
options="net"
|
||||
makedepends="go yarn"
|
||||
subpackages="$pkgname-openrc"
|
||||
install="$pkgname.pre-install"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/autobrr/autobrr/archive/v$pkgver.tar.gz
|
||||
autobrr.initd
|
||||
autobrr.confd
|
||||
"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
go mod download
|
||||
yarn --cwd web install
|
||||
}
|
||||
|
||||
build() {
|
||||
local ldflags="-X main.commit=alpine -X main.version=v$pkgver -X main.date=null"
|
||||
|
||||
yarn --cwd web build
|
||||
|
||||
mkdir -p bin
|
||||
go build -ldflags "$ldflags" -o bin/ ./cmd/...
|
||||
}
|
||||
|
||||
check() {
|
||||
go test ./...
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 ./bin/* -t "$pkgdir"/usr/bin
|
||||
|
||||
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
||||
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
e082ae9ded2d9c247437634caef5a5be7b3e2f9b4561e54e59d3d66c0bfd7d2ea2f89ab7c60c873644c0632b589290ccec620d7ea4ff079e890450a9f4624b2c autobrr-1.24.1.tar.gz
|
||||
c1ed2d16cd027a7dabbdf74e00a73e6db865390d4c12c2367098088697f04d5774265f02aad009169ea8e40d8e7eeaa5fa80cc3e5eb41f45e3675f64ee7d22c3 autobrr.initd
|
||||
6973e962bdd9e10c14e6c77c772e70cbd4ccf4606e1e1fdf00baa15adf20da8285eb3d208c94d9913e00e09308f98648c4a21a47da91b90221cd46ac099bd5f5 autobrr.confd
|
||||
"
|
||||
6
testing/autobrr/autobrr.confd
Normal file
6
testing/autobrr/autobrr.confd
Normal file
@ -0,0 +1,6 @@
|
||||
# autobrr configuration options
|
||||
|
||||
command_user="autobrr:autobrr" # user:group
|
||||
directory="/var/lib/autobrr"
|
||||
logdir="/var/log/autobrr"
|
||||
supervisor="supervise-daemon"
|
||||
26
testing/autobrr/autobrr.initd
Normal file
26
testing/autobrr/autobrr.initd
Normal file
@ -0,0 +1,26 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
# fallback values for /etc/conf.d/autobrr
|
||||
: ${command_user:=autobrr:autobrr}
|
||||
: ${directory:=/var/lib/autobrr}
|
||||
: ${logdir:=/var/log/autobrr}
|
||||
|
||||
name=autobrr
|
||||
description="autobrr daemon"
|
||||
command="/usr/bin/autobrr"
|
||||
command_args="--config=$directory"
|
||||
command_background=true
|
||||
|
||||
pidfile="/run/$name.pid"
|
||||
output_log="$logdir/output.log"
|
||||
error_log="$logdir/error.log"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns logger
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -o "$command_user" "$directory" "$logdir"
|
||||
checkpath -f -o "$command_user" "$output_log" "$error_log"
|
||||
}
|
||||
6
testing/autobrr/autobrr.pre-install
Normal file
6
testing/autobrr/autobrr.pre-install
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S autobrr 2>/dev/null
|
||||
adduser -S -D -h /var/lib/autobrr -s /sbin/nologin -G autobrr -g autobrr autobrr 2>/dev/null
|
||||
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user