1 |
|
# Copyright 2020-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit linux-info autotools
|
|
6 |
inherit systemd
|
7 |
7 |
|
8 |
|
DESCRIPTION="nftables load balancer"
|
9 |
|
HOMEPAGE="
|
10 |
|
https://www.relianoid.com/nftlb
|
11 |
|
https://github.com/relianoid/nftlb
|
|
8 |
DESCRIPTION="An indexer manager/proxy to integrate with your various PVR apps"
|
|
9 |
HOMEPAGE="https://wiki.servarr.com/prowlarr/
|
|
10 |
https://github.com/Prowlarr/Prowlarr/"
|
|
11 |
|
|
12 |
SRC_URI="
|
|
13 |
amd64? (
|
|
14 |
elibc_glibc? (
|
|
15 |
https://github.com/Prowlarr/Prowlarr/releases/download/v${PV}/Prowlarr.develop.${PV}.linux-core-x64.tar.gz
|
|
16 |
)
|
|
17 |
elibc_musl? (
|
|
18 |
https://github.com/Prowlarr/Prowlarr/releases/download/v${PV}/Prowlarr.develop.${PV}.linux-musl-core-x64.tar.gz
|
|
19 |
)
|
|
20 |
)
|
|
21 |
arm? (
|
|
22 |
elibc_glibc? (
|
|
23 |
https://github.com/Prowlarr/Prowlarr/releases/download/v${PV}/Prowlarr.develop.${PV}.linux-core-arm.tar.gz
|
|
24 |
)
|
|
25 |
elibc_musl? (
|
|
26 |
https://github.com/Prowlarr/Prowlarr/releases/download/v${PV}/Prowlarr.develop.${PV}.linux-musl-core-arm.tar.gz
|
|
27 |
)
|
|
28 |
)
|
|
29 |
arm64? (
|
|
30 |
elibc_glibc? (
|
|
31 |
https://github.com/Prowlarr/Prowlarr/releases/download/v${PV}/Prowlarr.develop.${PV}.linux-core-arm64.tar.gz
|
|
32 |
)
|
|
33 |
elibc_musl? (
|
|
34 |
https://github.com/Prowlarr/Prowlarr/releases/download/v${PV}/Prowlarr.develop.${PV}.linux-musl-core-arm64.tar.gz
|
|
35 |
)
|
|
36 |
)
|
12 |
37 |
"
|
13 |
|
SRC_URI="https://github.com/relianoid/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
|
38 |
S="${WORKDIR}/Prowlarr"
|
14 |
39 |
|
15 |
|
LICENSE="AGPL-3"
|
|
40 |
LICENSE="GPL-3"
|
16 |
41 |
SLOT="0"
|
17 |
|
KEYWORDS="~amd64 ~x86"
|
|
42 |
KEYWORDS="-* ~amd64 ~arm ~arm64"
|
|
43 |
RESTRICT="bindist strip test"
|
18 |
44 |
|
19 |
|
DEPEND="
|
20 |
|
net-firewall/nftables:=[modern-kernel(+)]
|
21 |
|
dev-libs/jansson:=
|
22 |
|
dev-libs/libev:=
|
23 |
|
"
|
24 |
45 |
RDEPEND="
|
25 |
|
${DEPEND}
|
|
46 |
acct-group/prowlarr
|
|
47 |
acct-user/prowlarr
|
|
48 |
dev-libs/icu
|
|
49 |
dev-db/sqlite
|
26 |
50 |
"
|
27 |
51 |
|
28 |
|
# tests need root access
|
29 |
|
RESTRICT="test"
|
30 |
|
|
31 |
|
PATCHES=(
|
32 |
|
"${FILESDIR}/nftlb-1.0.8-tests.patch"
|
33 |
|
"${FILESDIR}/nftlb-1.1.0-musl.patch"
|
34 |
|
)
|
35 |
|
|
36 |
|
pkg_setup() {
|
37 |
|
local CONFIG_CHECK="
|
38 |
|
~NF_TABLES
|
39 |
|
~NFT_NUMGEN
|
40 |
|
~NFT_HASH
|
41 |
|
~NF_NAT
|
42 |
|
~IP_NF_NAT
|
43 |
|
"
|
44 |
|
|
45 |
|
linux-info_pkg_setup
|
46 |
|
|
47 |
|
if kernel_is lt 4 19; then
|
48 |
|
eerror "${PN} requires kernel version 4.19 or newer"
|
49 |
|
fi
|
50 |
|
}
|
|
52 |
QA_PREBUILT="*"
|
51 |
53 |
|
52 |
54 |
src_prepare() {
|
53 |
|
# there are some compiler artifacts in the tarball
|
54 |
|
find "${S}" -name '*.o' -delete || die
|
55 |
|
|
56 |
55 |
default
|
57 |
|
eautoreconf
|
|
56 |
|
|
57 |
# https://github.com/dotnet/runtime/issues/57784
|
|
58 |
find . -type f -iname libcoreclrtraceptprovider.so -delete || die
|
58 |
59 |
}
|
59 |
60 |
|
60 |
|
src_test() {
|
61 |
|
pushd tests >/dev/null || die
|
|
61 |
src_install() {
|
|
62 |
newinitd "${FILESDIR}/prowlarr.init" prowlarr
|
|
63 |
|
|
64 |
keepdir /var/lib/prowlarr
|
|
65 |
fowners -R prowlarr:prowlarr /var/lib/prowlarr
|
62 |
66 |
|
63 |
|
sed -e "s:/var/log/syslog:\"${T}/tests.log\":" \
|
64 |
|
-i exec_tests.sh || die
|
|
67 |
insinto /etc/logrotate.d
|
|
68 |
insopts -m0644 -o root -g root
|
|
69 |
newins "${FILESDIR}/prowlarr.logrotate" prowlarr
|
65 |
70 |
|
66 |
|
./exec_tests.sh || die "tests failed"
|
|
71 |
dodir "/opt/prowlarr"
|
|
72 |
cp -R "${S}/." "${D}/opt/prowlarr" || die "Install failed!"
|
67 |
73 |
|
68 |
|
popd >/dev/null || die
|
|
74 |
systemd_dounit "${FILESDIR}/prowlarr.service"
|
|
75 |
systemd_newunit "${FILESDIR}/prowlarr.service" "prowlarr@.service"
|
69 |
76 |
}
|