aboutsummaryrefslogtreecommitdiffstats
path: root/community/qbittorrent/APKBUILD
blob: e06338aba2a5ea692aacc7f64583ab2721a6e91c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Contributor: Jan Tatje <jan@jnt.io>
# Contributor: Simon Zeni <simon@bl4ckb0ne.ca>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=qbittorrent
pkgver=4.4.3.1
pkgrel=1
pkgdesc="qBittorrent client"
url="https://www.qbittorrent.org/"
arch="all !s390x" # qt6-qttools
license="GPL-2.0-or-later"
options="!check" # qBittorrent has no tests
makedepends="
	boost-dev
	cmake
	libtorrent-rasterbar-dev
	ninja
	qt6-qtbase-dev
	qt6-qtsvg-dev
	qt6-qttools-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-nox
	$pkgname-nox-openrc:nox_openrc
	$pkgname-nox-doc:nox_doc
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-$pkgver.tar.gz
	qbittorrent-nox.initd
	qbittorrent-nox.confd
	rss-qt-6.3.0.patch
	"
builddir="$srcdir/qBittorrent-release-$pkgver"

# secfixes:
#   4.1.6-r3:
#     - CVE-2019-13640

build() {
	cmake -B build-gui -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
		-DWEBUI=OFF \
		-DSTACKTRACE=OFF \
		-DQT6=ON
	cmake --build build-gui

	cmake -B build-nox -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
		-DGUI=OFF \
		-DSTACKTRACE=OFF \
		-DQT6=ON
	cmake --build build-nox
}

package() {
	depends="qt6-qtsvg" # needed for ui icons
	DESTDIR="$pkgdir" cmake --install build-gui

	install -Dm755 build-nox/qbittorrent-nox \
		-t "$pkgdir"/usr/bin
	install -Dm755 "$srcdir"/$pkgname-nox.initd \
		"$pkgdir"/etc/init.d/$pkgname-nox
	install -Dm644 "$srcdir"/$pkgname-nox.confd \
		"$pkgdir"/etc/conf.d/$pkgname-nox
}

nox() {
	install="$pkgname-nox.pre-install"
	pkgdesc="$pkgdesc (webui)"

	amove usr/bin/qbittorrent-nox
}

nox_doc() {
	install -Dm644 "$builddir"/doc/qbittorrent-nox.1 \
		-t "$subpkgdir"/usr/share/man/man1
	default_doc
}

nox_openrc() {
	default_openrc
	pkgdesc="$pkgdesc (webui) (OpenRC init scripts)"
}

sha512sums="
e3d63c4090e27387f4a5524d0daab26eab70f70ef81ad607e9661e128ccccbf33f2d240cd219bbb1fb138d6e78493ce73055d5128bf888e0ad3949922774efba  qbittorrent-4.4.3.1.tar.gz
e84943b4e53717d4c53dc0a454aae2c43390b90afbd7e9d48c50cb914ac9041152a197677343ec81c6881bceb55228a2519bca9fffc158a713305214d0570711  qbittorrent-nox.initd
5cc840181f8b9febdc99b28dca9fe3f6b27a36bad0b20266e46d6ff148dfc9c5d9e6cba552198cd3d1b8ac5c21e2881d7defd8f13fcc8a862b93f4c80c1d4b19  qbittorrent-nox.confd
2e70f4c92d58337300714301c79d608ad4a77c81c865c606e799082187cfb3e95d143a65c4c4dce3d3de3d7c2bdafc74f8537e5fe2ac01a20720e588bf149701  rss-qt-6.3.0.patch
"