backports/airsonic-advanced: new aport

This commit is contained in:
Antoine Martin 2023-03-10 00:17:26 -05:00
parent 73d4e2a826
commit c7843f260a
Signed by: forge
GPG key ID: D62A472A4AA7D541
3 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,46 @@
# Contributor: Kay Thomas <kaythomas@pm.me>
# Maintainer: Kay Thomas <kaythomas@pm.me>
pkgname=airsonic-advanced
_sha=89e6fe9aec80daf8224c6696f8f86bfcf22c6e0a
pkgver=11.0.0_git20220624
pkgrel=1
pkgdesc="Modern implementation of the Airsonic fork with several key performance and feature enhancements"
url="https://github.com/airsonic-advanced/airsonic-advanced"
# inconsistent test and build failures on other arches
arch="x86_64"
license="GPL-3.0-or-later"
depends="openjdk11"
makedepends="maven"
subpackages="$pkgname-openrc"
pkgusers="airsonic-advanced"
pkggroups="airsonic-advanced"
install="$pkgname.pre-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/airsonic-advanced/airsonic-advanced/archive/$_sha.tar.gz
airsonic-advanced.initd
"
builddir="$srcdir/$pkgname-$_sha"
build() {
mvn clean package -DskipTests
}
check() {
mvn test
}
package() {
install -dm755 -o airsonic-advanced -g airsonic-advanced \
"$pkgdir"/var/airsonic
install -m755 -o airsonic-advanced -g airsonic-advanced \
"$builddir"/airsonic-main/target/airsonic.war \
"$pkgdir"/var/airsonic/airsonic.war
install -Dm755 "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname
}
sha512sums="
b794e6e6264613423fc2c7dec383d9a14a74a45a13efe7347c02b51a46e8debdd92fae35a6711540f04fa624ded77b9f377d54c3468c8c419380f1b133d4e3cd airsonic-advanced-11.0.0_git20220624.tar.gz
ca87e6a7199950e6ac52aeb076a03f831d60ee9d4ceed47366bbd78443765d205796d895ebb244051d8033e5b2e9ccd648d20434039c854b8b50e766cc5cd10d airsonic-advanced.initd
"

View file

@ -0,0 +1,14 @@
#!/sbin/openrc-run
supervisor=supervise-daemon
name="airsonic-advanced"
command="/usr/lib/jvm/java-11-openjdk/jre/bin/java"
command_args="-jar airsonic.war"
command_user="airsonic-advanced:airsonic-advanced"
directory="/var/airsonic"
pidfile="/run/airsonic-advanced.pid"
depend() {
need net localmount
after firewall
}

View file

@ -0,0 +1,6 @@
#!/bin/sh
addgroup -S airsonic-advanced 2>/dev/null
adduser -S -D -H -s /sbin/nologin -G airsonic-advanced -g airsonic-advanced airsonic-advanced 2>/dev/null
exit 0