blob: 096b6021231f0e9bab26549caa41dce2fc6bb359 (
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
|
# To disable Qt6, set USE_QT6 variable to OFF. For example:
# USE_QT6=OFF makepkg -si
pkgbase=qbittorrent-enhanced-ua
pkgname=(qbittorrent-enhanced-ua qbittorrent-enhanced-ua-nox)
pkgver=4.6.4.10
pkgrel=1
pkgdesc="An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar (Enhanced Edition with original user-agent)"
arch=('x86_64')
_repo="qBittorrent-Enhanced-Edition"
url="https://github.com/c0re100/${_repo}"
license=('custom' 'GPL')
depends=('libtorrent-rasterbar')
makedepends=('cmake' 'boost')
optdepends=('python: needed for torrent search tab')
_rel="release-${pkgver}"
_snapshot="${_repo}-${_rel}"
source=("${_snapshot}.tar.gz::${url}/archive/${_rel}.tar.gz")
sha256sums=('096c081ae018c5a2c70762647f63ca6ddb31946a8428bc718ac3e5f390245bf1')
USE_QT6="${USE_QT6:-ON}"
if [ "${USE_QT6}" = "ON" ]; then
depends+=('qt6-base')
_gdeps=('qt6-svg')
makedepends+=('qt6-svg' 'qt6-tools')
else
depends+=('qt5-base')
_gdeps=('qt5-svg')
makedepends+=('qt5-svg' 'qt5-tools')
fi
prepare() {
cd "${_snapshot}"
sed -e 's|"qBittorrent Enhanced/"|"qBittorrent/"|' -i 'src/base/bittorrent/sessionimpl.cpp'
sed -e 's|#define QBT_VERSION_BUILD .\+|#define QBT_VERSION_BUILD 0|' -i 'src/base/version.h.in'
}
build() {
cmake -B "build" -S "${_snapshot}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQT6="${USE_QT6}"
cmake --build "build"
cmake -B "build-nox" -S "${_snapshot}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQT6="${USE_QT6}" \
-DGUI=OFF \
-DSYSTEMD=ON
cmake --build "build-nox"
}
package_qbittorrent-enhanced-ua() {
depends+=("${_gdeps[@]}" 'hicolor-icon-theme')
provides=('qbittorrent')
conflicts=('qbittorrent')
DESTDIR="${pkgdir}" cmake --install "build"
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${_snapshot}/COPYING"
}
package_qbittorrent-enhanced-ua-nox() {
provides=('qbittorrent-nox')
conflicts=('qbittorrent-nox')
DESTDIR="${pkgdir}" cmake --install "build-nox"
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${_snapshot}/COPYING"
}
|