mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-09 07:41:58 +02:00
90 lines
2.6 KiB
Plaintext
90 lines
2.6 KiB
Plaintext
# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
|
|
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
|
|
pkgname=ombi
|
|
pkgver=4.43.5
|
|
pkgrel=0
|
|
pkgdesc="Friendly media request tool which automatically syncs with your media servers!"
|
|
url="https://ombi.io"
|
|
arch="x86_64 aarch64 armv7" # blocked by dotnet6-sdk
|
|
license="GPL-2.0-only"
|
|
depends="aspnetcore6-runtime sqlite-libs"
|
|
makedepends="dotnet6-sdk yarn"
|
|
subpackages="$pkgname-openrc"
|
|
install="$pkgname.pre-install"
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://github.com/Ombi-app/Ombi/archive/refs/tags/v$pkgver.tar.gz
|
|
ombi.initd
|
|
ombi.confd
|
|
"
|
|
builddir="$srcdir/Ombi-$pkgver"
|
|
pkgusers="ombi"
|
|
pkggroups="ombi"
|
|
options="net" # dotnet and yarn dependencies
|
|
|
|
export DOTNET_CLI_HOME="$builddir"/dotnetclihome
|
|
|
|
case $CARCH in
|
|
x86_64) _dotnet_arch="x64";;
|
|
aarch64) _dotnet_arch="arm64";;
|
|
armv7) _dotnet_arch="arm";;
|
|
*) _dotnet_arch="$CARCH";;
|
|
esac
|
|
|
|
_backend="$builddir/src/Ombi"
|
|
_frontend="$_backend/ClientApp"
|
|
_artifacts="$_backend/bin/Release/net6.0"
|
|
_runtime="linux-musl-$_dotnet_arch"
|
|
|
|
build() {
|
|
# set backend version
|
|
dotnet new tool-manifest
|
|
dotnet tool install --local dotnet-setversion
|
|
dotnet setversion -r "$pkgver"
|
|
|
|
# build the backend
|
|
dotnet publish "$_backend" \
|
|
-c Release \
|
|
-r "$_runtime" \
|
|
--no-self-contained
|
|
|
|
# move binaries out of runtime directory
|
|
mv "$_artifacts/$_runtime"/publish/* "$_artifacts" -f
|
|
rm -r "${_artifacts:?}/${_runtime:?}"
|
|
|
|
# remove dev config
|
|
rm "$_artifacts"/appsettings.Development.json
|
|
|
|
# build frontend
|
|
yarn --cwd "$_frontend" install --network-timeout 120000 --frozen-lockfile
|
|
yarn --cwd "$_frontend" build
|
|
|
|
# move frontend to atrifacts directory
|
|
mkdir -p "$_artifacts"/ClientApp
|
|
mv "$_frontend"/dist "$_artifacts"/ClientApp
|
|
}
|
|
|
|
check() {
|
|
make backend-tests
|
|
}
|
|
|
|
package() {
|
|
# setup runtime config file
|
|
mkdir -p "$pkgdir"/var/lib/ombi
|
|
chown -R "$pkgusers:$pkggroups" "$pkgdir"/var/lib/ombi
|
|
|
|
local DESTDIR="$pkgdir"/usr/lib/ombi
|
|
|
|
mkdir -p "$DESTDIR"
|
|
cp -af "$_artifacts"/* "$DESTDIR"
|
|
chown -R "$pkgusers:$pkggroups" "$DESTDIR"
|
|
|
|
install -Dm755 "$srcdir"/ombi.initd "$pkgdir"/etc/init.d/ombi
|
|
install -Dm644 "$srcdir"/ombi.confd "$pkgdir"/etc/conf.d/ombi
|
|
}
|
|
|
|
sha512sums="
|
|
92f4eb27d0a1501347014e357738b51d9fe7ef769e744021281da18d74a513bf2c8d4b156a248b3719066bbf1064097a65228084f55d41994bf18abc6d8b05f7 ombi-4.43.5.tar.gz
|
|
0b37c888251402490a6cfa5b8eb3e822bc3c73cc41b0741cf02a1af51cabacea7b2c12194ded48628fac0111de9baefaf0527c1b2946e08c9fff13715aa34a0f ombi.initd
|
|
7355ae0ffedc179688dc6e4c472bd8963b2cbb851bf00a103febe3138630c1cc8c7af37dc7d2e61bff7dc47214517d5b02bc0e8744894f1ff7272df5f566b8c1 ombi.confd
|
|
"
|