Skip to content
Snippets Groups Projects
Commit a62a5eb7 authored by Fabricio Silva's avatar Fabricio Silva :thumbsup: Committed by alice
Browse files

testing/autobrr: new aport

parent bcab1c4f
No related branches found
No related tags found
1 merge request!44823testing/autobrr: new aport
Pipeline #162568 canceled
# 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
"
# autobrr configuration options
command_user="autobrr:autobrr" # user:group
directory="/var/lib/autobrr"
logdir="/var/log/autobrr"
supervisor="supervise-daemon"
#!/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"
}
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment