2023-02-26 00:30:07 +00:00
|
|
|
# Contributor: Fabricio Silva <hi@fabricio.dev>
|
2025-02-19 10:50:24 +00:00
|
|
|
maintainer="Fabricio Silva <hi@fabricio.dev>"
|
2023-02-26 00:30:07 +00:00
|
|
|
pkgname=prowlarr
|
2025-05-09 11:28:59 +01:00
|
|
|
pkgver=1.35.1.5034
|
2024-01-01 09:44:37 +00:00
|
|
|
pkgrel=0
|
2023-06-05 10:27:04 +01:00
|
|
|
pkgdesc="Aggregator for usenet index and torrent tracker"
|
2023-02-26 00:30:07 +00:00
|
|
|
url="https://github.com/Prowlarr/Prowlarr"
|
2024-05-14 00:55:48 +01:00
|
|
|
arch="x86_64 aarch64 armv7" # limited by dotnet
|
2023-02-26 00:30:07 +00:00
|
|
|
license="GPL-3.0-only"
|
2024-05-14 00:55:48 +01:00
|
|
|
options="net" # net for nuget
|
|
|
|
depends="aspnetcore6-runtime sqlite-libs"
|
|
|
|
makedepends="dotnet6-sdk yarn"
|
2023-02-26 00:30:07 +00:00
|
|
|
subpackages="$pkgname-openrc"
|
|
|
|
install="$pkgname.pre-install"
|
|
|
|
source="
|
|
|
|
$pkgname-$pkgver.tar.gz::https://github.com/Prowlarr/Prowlarr/archive/refs/tags/v$pkgver.tar.gz
|
2023-04-08 14:12:35 +01:00
|
|
|
0001-disable-restart.patch
|
2023-02-26 00:30:07 +00:00
|
|
|
prowlarr.initd
|
|
|
|
prowlarr.confd
|
|
|
|
package_info
|
|
|
|
"
|
|
|
|
builddir="$srcdir/Prowlarr-$pkgver"
|
|
|
|
pkgusers="prowlarr"
|
|
|
|
pkggroups="prowlarr"
|
|
|
|
|
2024-05-14 00:55:48 +01:00
|
|
|
# secfixes:
|
|
|
|
# 1.17.2.4511-r0:
|
|
|
|
# - CVE-2024-32655
|
|
|
|
|
2023-02-26 00:30:07 +00:00
|
|
|
# map arch to dotnet
|
|
|
|
case $CARCH in
|
2023-05-04 16:37:27 +01:00
|
|
|
x86_64) _dotnet_arch="x64" ;;
|
|
|
|
aarch64) _dotnet_arch="arm64" ;;
|
|
|
|
armv7) _dotnet_arch="arm" ;;
|
|
|
|
*) _dotnet_arch="$CARCH" ;;
|
2023-02-26 00:30:07 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
# custom variables
|
|
|
|
_runtime="linux-musl-$_dotnet_arch"
|
|
|
|
_framework="net6.0"
|
2023-05-04 16:37:27 +01:00
|
|
|
_output="_output"
|
2023-02-26 00:30:07 +00:00
|
|
|
_artifacts="$_output/$_framework/$_runtime/publish"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
|
|
|
|
2023-06-05 10:27:04 +01:00
|
|
|
export BROWSERSLIST_IGNORE_OLD_DATA=true
|
|
|
|
yarn install --frozen-lockfile --network-timeout 120000
|
2023-02-26 00:30:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2025-02-19 10:50:24 +00:00
|
|
|
# increase max opened files
|
|
|
|
ulimit -n 4096
|
|
|
|
|
2023-05-04 16:37:27 +01:00
|
|
|
dotnet build src \
|
2025-01-30 09:54:53 +00:00
|
|
|
-p:AssemblyConfiguration="master" \
|
|
|
|
-p:AssemblyVersion="$pkgver" \
|
2023-02-26 00:30:07 +00:00
|
|
|
-p:RuntimeIdentifiers="$_runtime" \
|
|
|
|
-p:Configuration=Release \
|
|
|
|
-p:SelfContained=false \
|
|
|
|
-t:PublishAllRids
|
2023-05-04 16:37:27 +01:00
|
|
|
yarn build --env production --no-stats
|
2023-02-26 00:30:07 +00:00
|
|
|
|
2023-06-05 10:27:04 +01:00
|
|
|
# cleanup
|
|
|
|
find "$_artifacts" \( \
|
|
|
|
-name "ServiceUninstall.*" -o \
|
|
|
|
-name "ServiceInstall.*" -o \
|
|
|
|
-name "Prowlarr.Windows.*" \) -delete
|
|
|
|
|
2023-02-26 00:30:07 +00:00
|
|
|
mv "$_output"/UI "$_artifacts"
|
|
|
|
}
|
|
|
|
|
2024-05-14 00:55:48 +01:00
|
|
|
check() {
|
2024-06-03 06:30:35 +01:00
|
|
|
local _filters="Category!=ManualTest&Category!=AutomationTest&Category!=WINDOWS"
|
2024-05-14 00:55:48 +01:00
|
|
|
|
|
|
|
# skipping:
|
2024-06-03 06:30:35 +01:00
|
|
|
# IntegrationTest: broken
|
|
|
|
# DiskTransferServiceFixture: CI fails due disk permission
|
|
|
|
_filters="$_filters&Category!=IntegrationTest&FullyQualifiedName!~DiskTransferServiceFixture"
|
2025-01-12 21:24:50 +00:00
|
|
|
# HttpProxySettingsProviderFixture: fails (ExtendedSocketException: Name does not resolve)
|
|
|
|
_filters="$_filters&FullyQualifiedName!~HttpProxySettingsProviderFixture"
|
2025-04-15 11:58:50 +00:00
|
|
|
# UpdateTests: update is disabled
|
|
|
|
_filters="$_filters&FullyQualifiedName!~UpdateTests"
|
2024-05-14 00:55:48 +01:00
|
|
|
|
2024-06-03 06:30:35 +01:00
|
|
|
# link build to tests
|
|
|
|
ln -sf ../../$_artifacts _tests/$_framework/$_runtime/bin
|
2024-05-14 00:55:48 +01:00
|
|
|
mkdir -p ~/.config/Prowlarr
|
2024-06-03 06:30:35 +01:00
|
|
|
|
|
|
|
dotnet test src \
|
|
|
|
--runtime "$_runtime" \
|
|
|
|
--configuration Release \
|
|
|
|
--filter "$_filters" \
|
|
|
|
--no-build
|
2024-05-14 00:55:48 +01:00
|
|
|
}
|
|
|
|
|
2023-02-26 00:30:07 +00:00
|
|
|
package() {
|
2024-04-20 13:39:28 +01:00
|
|
|
local destdir="$pkgdir"/usr/lib/prowlarr
|
2023-02-26 00:30:07 +00:00
|
|
|
|
|
|
|
# use package_info to disable update feature
|
2024-04-20 13:39:28 +01:00
|
|
|
install -Dm644 "$srcdir"/package_info "$destdir"/package_info
|
|
|
|
echo "PackageVersion=$pkgver-r$pkgrel" >>"$destdir"/package_info
|
2023-02-26 00:30:07 +00:00
|
|
|
|
2024-04-20 13:39:28 +01:00
|
|
|
cp -af "$_artifacts" "$destdir"/bin
|
|
|
|
chown -R "$pkgusers:$pkggroups" "$destdir"
|
2023-02-26 00:30:07 +00:00
|
|
|
|
|
|
|
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
|
|
|
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
|
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="
|
2025-05-09 11:28:59 +01:00
|
|
|
765398a3a9209eb58acbe626dfaf0b30cfcf4f63a88c954f696a2a1e368d9aaf13ce55ba95a0f6c6078ba8e6a477a9ed6c42b574f8870eeca4e8fc1bfba1e2bf prowlarr-1.35.1.5034.tar.gz
|
2023-04-08 14:12:35 +01:00
|
|
|
753520379a6c5f2899b4ddfd820d5573598a32cb105f74c6fd978a3f2c98895cf709ef2d9afe2bae8c4856da86cb6a1364f5713ea7ef6a36bb21b5a5840c1471 0001-disable-restart.patch
|
2023-10-16 09:36:38 +01:00
|
|
|
33de66749dc613a430ce00abcff070b646c80f158de2bf70c7078e5526f93348f24bb5d45ff55e3e06123aa4c849a8eebfebf941c8f9c54db87fa614bda679c7 prowlarr.initd
|
|
|
|
1f073dd820a890e7d24d84e18763b04f07abd86a0370f56f7319c3e7c9da9d3e2be484e0cef2fb5fc4050be1cbb1e0445080d702d217393633256ed3758fc593 prowlarr.confd
|
2023-02-26 00:30:07 +00:00
|
|
|
67c4dd1cf8259296d994c350dfd3962d23333071889ce0b4ef6b2f4cbb4349490c5dbe4dcc202c99bab7a5c4b7611be56d7c8835b2b13924526c45311db1c3fb package_info
|
|
|
|
"
|