Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions cross/autobrr/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
PKG_NAME = autobrr
PKG_VERS = 1.65.0
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)_$(PKG_VERS)_linux_$(PKG_DIST_ARCH).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/autobrr/autobrr/releases/download/v$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

HOMEPAGE = https://autobrr.com/
COMMENT = Modern, easy to use download automation for torrents and usenet.
LICENSE = GPLv2

INSTALL_TARGET = autobrr_install

# download prebuilt binaries
# supported archs are x64, ARMv7 and AARCH64
PKG_DIST_ARCH_LIST = x86_64 arm arm64
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(PPC_ARCHS) $(i686_ARCHS)

include ../../mk/spksrc.archs.mk
ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
PKG_DIST_ARCH = x86_64
else ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
PKG_DIST_ARCH = arm
else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
PKG_DIST_ARCH = arm64
endif


include ../../mk/spksrc.install-resources.mk

.PHONY: autobrr_install
autobrr_install:
@install -d $(STAGING_INSTALL_PREFIX)/bin
@install -m 755 $(WORK_DIR)/autobrr $(STAGING_INSTALL_PREFIX)/bin/
@install -m 755 $(WORK_DIR)/autobrrctl $(STAGING_INSTALL_PREFIX)/bin/
2 changes: 2 additions & 0 deletions cross/autobrr/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin:bin/autobrr
bin:bin/autobrrctl
9 changes: 9 additions & 0 deletions cross/autobrr/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
autobrr_1.65.0_linux_x86_64.tar.gz SHA1 e2a4d6675f61d5890a8b357e362e620eb82543d9
autobrr_1.65.0_linux_x86_64.tar.gz SHA256 707b56a5a6d401f568ea705d95b6c5c6bfac9a837290a91a21fe0761e00dc8a6
autobrr_1.65.0_linux_x86_64.tar.gz MD5 39099bf99f33c2fa5835648f492e5cad
autobrr_1.65.0_linux_arm.tar.gz SHA1 041e32ac139dbd673be86c38d50df6223b8e2671
autobrr_1.65.0_linux_arm.tar.gz SHA256 d2a383ad72db9b1638be93c8a955536053354c55e9ce0a36a2ea5d2942e909c1
autobrr_1.65.0_linux_arm.tar.gz MD5 7a1182ce562b6deb88ec364352cec3ef
autobrr_1.65.0_linux_arm64.tar.gz SHA1 8d26d57637b368918358ce3c6e4f25e9a1e0876b
autobrr_1.65.0_linux_arm64.tar.gz SHA256 9f2ab577bc0eb2ab5ae0cdcfd793b785d5aab045163200ef7ecb5d3ee6a9ee87
autobrr_1.65.0_linux_arm64.tar.gz MD5 3c6dcf76f5b489a013fe037dffb8b323
32 changes: 32 additions & 0 deletions spk/autobrr/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
SPK_NAME = autobrr
SPK_VERS = 1.65.0
SPK_REV = 1
SPK_ICON = src/autobrr.png

DEPENDS = cross/autobrr

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(PPC_ARCHS) $(i686_ARCHS)

MAINTAINER = SynoCommunity
DESCRIPTION = Modern, easy to use download automation for torrents and usenet.
DISPLAY_NAME = autobrr
CHANGELOG = "Initial package release."
HOMEPAGE = https://autobrr.com/
LICENSE = GPLv2

SERVICE_USER = auto
SERVICE_SETUP = src/service-setup.sh
STARTABLE = yes

SERVICE_PORT = 7474
SERVICE_PORT_TITLE = autobrr (web ui)

POST_STRIP_TARGET = autobrr_extra_install

include ../../mk/spksrc.spk.mk

.PHONY: autobrr_extra_install
autobrr_extra_install:
@$(MSG) "Install config file."
@install -m 755 -d $(STAGING_DIR)/var
@install -m 644 src/config.toml $(STAGING_DIR)/var/
Binary file added spk/autobrr/src/autobrr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions spk/autobrr/src/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# config.toml

# Hostname / IP
#
# Default: "localhost"
#
host = "0.0.0.0"

# Port
#
# Default: 7474
#
port = 7474

# Base url
# Set custom baseUrl eg /autobrr/ to serve in subdirectory.
# Not needed for subdomain, or by accessing with the :port directly.
#
# Optional
#
#baseUrl = "/autobrr/"

# Base url mode legacy
# This is kept for compatibility with older versions doing url rewrite on the proxy.
# If you use baseUrl you can set this to false and skip any url rewrite in your proxy.
#
# Default: true
#
baseUrlModeLegacy = true

# autobrr logs file
# If not defined, logs to stdout
# Make sure to use forward slashes and include the filename with extension. eg: "log/autobrr.log", "C:/autobrr/log/autobrr.log"
#
# Optional
#
logPath = "/var/packages/autobrr/var/log/autobrr.log"

# Log level
#
# Default: "DEBUG"
#
# Options: "ERROR", "DEBUG", "INFO", "WARN", "TRACE"
#
logLevel = "INFO"

# Log Max Size
#
# Default: 50
#
# Max log size in megabytes
#
#logMaxSize = 50

# Log Max Backups
#
# Default: 3
#
# Max amount of old log files
#
#logMaxBackups = 3

# Check for updates
#
checkForUpdates = false

# Session secret
#
sessionSecret = "@@session_secret@@"

# Database Max Backups
#
# Default: 5
#
#databaseMaxBackups = 5

# Golang pprof profiling and tracing
#
#profilingEnabled = false
#
#profilingHost = "127.0.0.1"
#
# Default: 6060
#profilingPort = 6060

# OpenID Connect Configuration
#
# Enable OIDC authentication
#oidcEnabled = false
#
# OIDC Issuer URL (e.g. https://auth.example.com)
#oidcIssuer = ""
#
# OIDC Client ID
#oidcClientId = ""
#
# OIDC Client Secret
#oidcClientSecret = ""
#
# OIDC Redirect URL (e.g. http://localhost:7474/api/auth/oidc/callback)
#oidcRedirectUrl = ""
#
# Disable Built In Login Form (only works when using external auth)
#oidcDisableBuiltInLogin = false

# Metrics
#
# Enable metrics endpoint
#metricsEnabled = true
#
# Metrics server host
#
#metricsHost = "127.0.0.1"
#
# Metrics server port
#
#metricsPort = 9074
#
# Metrics basic auth
#
# Comma separate list of user:password. Password must be htpasswd bcrypt hashed. Use autobrrctl to generate.
# Only enabled if correctly set with user:pass.
#
#metricsBasicAuthUsers = ""

# Custom definitions
#
#customDefinitions = "test/definitions"
18 changes: 18 additions & 0 deletions spk/autobrr/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

CONFIG_FILE=${SYNOPKG_PKGVAR}/config.toml

SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/autobrr --config ${SYNOPKG_PKGVAR}"
SVC_BACKGROUND=y
SVC_WRITE_PID=y

# avoid error "open /sys/fs/cgroup/cpu/autobrr.slice/cpu.cfs_quota_us: no such file or directory"
NPROCS=$(nproc 2>/dev/null)
export GOMAXPROCS=${NPROCS:-1}


service_postinst ()
{
# initialize random session secret
SECRET=$(head -c 16 /dev/urandom | xxd -p)
sed -e s/@@session_secret@@/${SECRET}/g -i ${CONFIG_FILE}
}