commit: cb5296a1671cf67101c402349f9257acf7ab28e9 Author: orbea <orbea <AT> riseup <DOT> net> AuthorDate: Thu Oct 3 16:31:43 2024 +0000 Commit: orbea <orbea <AT> riseup <DOT> net> CommitDate: Thu Oct 3 16:32:03 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=cb5296a1
net-p2p/qbittorrent: new package, add 5.0.0 Closes: https://github.com/gentoo/libressl/issues/572 Signed-off-by: orbea <orbea <AT> riseup.net> net-p2p/qbittorrent/Manifest | 2 + net-p2p/qbittorrent/files/qbittorrent.confd | 20 ++++ net-p2p/qbittorrent/files/qbittorrent.initd | 27 ++++++ net-p2p/qbittorrent/metadata.xml | 25 +++++ net-p2p/qbittorrent/qbittorrent-5.0.0.ebuild | 138 +++++++++++++++++++++++++++ 5 files changed, 212 insertions(+) diff --git a/net-p2p/qbittorrent/Manifest b/net-p2p/qbittorrent/Manifest new file mode 100644 index 0000000..5aca384 --- /dev/null +++ b/net-p2p/qbittorrent/Manifest @@ -0,0 +1,2 @@ +DIST qbittorrent-5.0.0.tar.xz 4512592 BLAKE2B 156a2aae2c45d877197d50ec0c42b003dcb290d2e612b93d94f10c1c1b55fb24d6bc37cfd489b70f545bb4f390ee35634a808992441ce49e7e27de5ecb508943 SHA512 ab480c181f3a43a3e248daa35d3d3e0b121eb80bfd8a4a4d63fd504ba26441a31e7ca563fe80bc520ad1219104cf929460cfc0a5cfdad13ad61a5a316deeb695 +DIST qbittorrent-5.0.0.tar.xz.asc 849 BLAKE2B c3fee4711f51491c26ca7669ce8746853b886334454b1b6a7ae0fb61e2634cfe3172c00f3b0ac2c1ca498b23969c3d6ac3095fbb380e9a3626a1923705a40fb3 SHA512 60589122b9030f17afa766a757992134430f7bb32ee97acc5f544dcac99f82a0fc00411d46a11c52f350790f86fa686158e06c74cc53dbabcfc96ebb5f4af09e diff --git a/net-p2p/qbittorrent/files/qbittorrent.confd b/net-p2p/qbittorrent/files/qbittorrent.confd new file mode 100644 index 0000000..21e2e42 --- /dev/null +++ b/net-p2p/qbittorrent/files/qbittorrent.confd @@ -0,0 +1,20 @@ +# /etc/conf.d/qbittorrent: config file for /etc/init.d/qbittorrent + +# User and group as which to run +#QBITTORRENT_USER="qbittorrent" +#QBITTORRENT_GROUP="qbittorrent" + +# Directory where qBittorrent saves its logs (and maybe downloads) +#QBITTORRENT_DIRECTORY="/var/lib/qbittorrent" + +# umask used to create files +#QBITTORRENT_UMASK=0022 + +# I/O nice level of qBittorrent +#QBITTORRENT_IONICE=0 + +# Nice level of qBittorrent +#QBITTORRENT_NICE=0 + +# Extra opts given to qBittorrent +#QBITTORRENT_OPTS="" diff --git a/net-p2p/qbittorrent/files/qbittorrent.initd b/net-p2p/qbittorrent/files/qbittorrent.initd new file mode 100644 index 0000000..a04de6a --- /dev/null +++ b/net-p2p/qbittorrent/files/qbittorrent.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +QBITTORRENT_USER=${QBITTORRENT_USER:-qbittorrent} +QBITTORRENT_GROUP=${QBITTORRENT_GROUP:-qbittorrent} +QBITTORRENT_DIRECTORY=${QBITTORRENT_DIRECTORY:-/var/lib/qbittorrent} +QBITTORRENT_UMASK=${QBITTORRENT_UMASK:-0022} +QBITTORRENT_IONICE=${QBITTORRENT_IONICE:-0} +QBITTORRENT_NICE=${QBITTORRENT_NICE:-0} + +description="BitTorrent client in C++ and Qt" +command="/usr/bin/qbittorrent-nox" +command_args="${QBITTORRENT_OPTS}" +pidfile="/run/${RC_SVCNAME}.pid" +command_background="yes" +command_user="${QBITTORRENT_USER}:${QBITTORRENT_GROUP}" +umask="${QBITTORRENT_UMASK}" +start_stop_daemon_args="--ionice ${QBITTORRENT_IONICE} --nicelevel ${QBITTORRENT_NICE}" + +depend() { + need localmount net +} + +start_pre() { + checkpath -q -d -o ${QBITTORRENT_USER}:${QBITTORRENT_GROUP} ${QBITTORRENT_DIRECTORY} +} diff --git a/net-p2p/qbittorrent/metadata.xml b/net-p2p/qbittorrent/metadata.xml new file mode 100644 index 0000000..f62d481 --- /dev/null +++ b/net-p2p/qbittorrent/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>eschwa...@gentoo.org</email> + <name>Eli Schwartz</name> + </maintainer> + <maintainer type="person" proxied="yes"> + <email>fk...@pm.me</email> + <name>Filip Kobierski</name> + </maintainer> + <use> + <flag name="webui"> + Install qBittorrent Web UI (qbittorrent-nox) and systemd/OpenRC service + </flag> + </use> + <upstream> + <bugs-to>https://github.com/qbittorrent/qBittorrent/issues</bugs-to> + <changelog>https://www.qbittorrent.org/news</changelog> + <doc>https://github.com/qbittorrent/qBittorrent/wiki</doc> + <remote-id type="github">qbittorrent/qBittorrent</remote-id> + <!-- Sourceforge hosts the distfiles. + Ignore the "redirection" and "missing remote-id" warnings --> + </upstream> +</pkgmetadata> diff --git a/net-p2p/qbittorrent/qbittorrent-5.0.0.ebuild b/net-p2p/qbittorrent/qbittorrent-5.0.0.ebuild new file mode 100644 index 0000000..d89451c --- /dev/null +++ b/net-p2p/qbittorrent/qbittorrent-5.0.0.ebuild @@ -0,0 +1,138 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake edo multibuild optfeature systemd verify-sig xdg + +DESCRIPTION="BitTorrent client in C++ and Qt" +HOMEPAGE="https://www.qbittorrent.org" + +if [[ ${PV} == *9999 ]]; then + EGIT_REPO_URI="https://github.com/qbittorrent/qBittorrent.git" + inherit git-r3 +else + SRC_URI=" + https://downloads.sourceforge.net/qbittorrent/${P}.tar.xz + verify-sig? ( https://downloads.sourceforge.net/qbittorrent/${P}.tar.xz.asc ) + " + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-qbittorrent )" + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/qBittorrent.asc +fi + +LICENSE="GPL-2+ GPL-3+" +SLOT="0" +IUSE="+dbus +gui systemd test webui" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + || ( gui webui ) + dbus? ( gui ) +" + +RDEPEND=" + >=dev-libs/openssl-3.0.2:= + >=net-libs/libtorrent-rasterbar-1.2.19:= + >=sys-libs/zlib-1.2.11 + >=dev-qt/qtbase-6.5:6[network,ssl,sql,sqlite,xml] + gui? ( + >=dev-qt/qtbase-6.5:6[dbus?,gui,widgets] + >=dev-qt/qtsvg-6.5:6 + ) + webui? ( + acct-group/qbittorrent + acct-user/qbittorrent + ) +" +DEPEND=" + ${RDEPEND} + >=dev-libs/boost-1.76 +" +BDEPEND+=" + >=dev-qt/qttools-6.5:6[linguist] + virtual/pkgconfig +" + +DOCS=( AUTHORS Changelog CONTRIBUTING.md README.md ) + +src_prepare() { + MULTIBUILD_VARIANTS=() + use gui && MULTIBUILD_VARIANTS+=( gui ) + use webui && MULTIBUILD_VARIANTS+=( nogui ) + + # Detect LibreSSL + sed -e 's/minOpenSSLVersion 3.0.2/minOpenSSLVersion 2.0.0/' -i CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + my_src_configure() { + local mycmakeargs=( + # musl lacks execinfo.h + -DSTACKTRACE=$(usex !elibc_musl) + # More verbose build logs are preferable for bug reports + -DVERBOSE_CONFIGURE=ON + -DWEBUI=$(usex webui) + -DTESTING=$(usex test) + ) + + if [[ ${MULTIBUILD_VARIANT} == "gui" ]]; then + # We do this in multibuild, see bug #839531 for why. + # Fedora has to do the same thing. + mycmakeargs+=( + -DGUI=ON + -DDBUS=$(usex dbus) + -DSYSTEMD=OFF + ) + else + mycmakeargs+=( + -DGUI=OFF + -DDBUS=OFF + ) + + use systemd && mycmakeargs+=( + # The systemd service calls qbittorrent-nox, which is only + # installed when GUI=OFF. + -DSYSTEMD=ON + -DSYSTEMD_SERVICES_INSTALL_DIR="$(systemd_get_systemunitdir)" + ) + fi + + cmake_src_configure + } + + multibuild_foreach_variant my_src_configure +} + +src_compile() { + multibuild_foreach_variant cmake_src_compile +} + +src_test() { + my_src_test() { + # cmake does not detect tests by default, if you use enable_testing + # in a subdirectory instead of the root CMakeLists.txt + cd "${BUILD_DIR}"/test || die + edo ctest . + } + + multibuild_foreach_variant my_src_test +} + +src_install() { + multibuild_foreach_variant cmake_src_install + einstalldocs + + if use webui; then + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + fi +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature "I2P anonymyzing network support" net-vpn/i2pd net-vpn/i2p +}