File qBittorrent-Enhanced-Edition.spec of Package qBittorrent-Enhanced-Edition
#
# spec file for package qBittorrent-Enhanced-Edition
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: qBittorrent-Enhanced-Edition
Version: 0
Release: 0
Summary: A BitTorrent client in Qt
License: GPL-2.0-or-later
Group: Productivity/Networking/File-Sharing
URL: https://github.com/c0re100/qBittorrent-Enhanced-Edition
Source: %{name}-%{version}.tar.zst
# PATCH-FIX-OPENSUSE qbittorrent-fix_boost_1.75_build.patch search for libboost_system.so and patch stacktrace function # aloisio@gmx.com --from network/qbittorrent
#Patch2: qbittorrent-fix_boost_1.75_build.patch
BuildRequires: cmake >= 3.16
BuildRequires: fdupes
BuildRequires: libtorrent-rasterbar-devel
%if 0%{?suse_version} > 1600
%else
%if 0%{?suse_version} > 1500
BuildRequires: libboost_system-devel
%else
BuildRequires: libboost_system1_75_0-devel
%endif
%endif
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig(systemd)
BuildRequires: zlib-devel
BuildRequires: qt6-base-common-devel
BuildRequires: qt6-core-devel
BuildRequires: qt6-base-private-devel
BuildRequires: qt6-core-private-devel
BuildRequires: qt6-svg-devel
BuildRequires: qt6-dbus-devel
BuildRequires: qt6-tools-linguist
BuildRequires: qt6-linguist-devel
BuildRequires: qt6-network-devel
BuildRequires: qt6-xml-devel
BuildRequires: qt6-sql-devel
%description
qBittorrent is a bittorrent client programmed in C++ / Qt that uses libtorrent
(sometimes called libtorrent-rasterbar) by Arvid Norberg.
It aims to be a good alternative to all other bittorrent clients out there.
qBittorrent is fast, stable and provides unicode support as well as many features.
%package nox
Summary: qBittorrent-Enhanced-Edition without GUI
%description nox
qBittorrent is a bittorrent client programmed in C++ and Qt that uses
libtorrent-rasterbar. This subpackage contains a command-line version.
%prep
%autosetup -p1
%build
for ui in nox gui; do
[ "$ui" = nox ] && ui_opt="-DGUI=OFF" || ui_opt=
# Use a separate build dir for each variant
%define __qt6_builddir build_$ui
%cmake_qt6 \
-DQT6=ON \
-DSYSTEMD=ON \
-DSystemd_SERVICES_INSTALL_DIR=%{_unitdir} \
$ui_opt
%qt6_build
done
%install
for ui in nox gui; do
%define __qt6_builddir build_$ui
%qt6_install
done
mkdir -p %{buildroot}%{_sbindir}/
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcqbittorrent-nox
%fdupes %{buildroot}%{_datadir}/
%preun nox
%service_del_preun qbittorrent-nox@.service
%pre nox
%service_add_pre qbittorrent-nox@.service
%postun nox
%service_del_postun qbittorrent-nox@.service
%post nox
%service_add_post qbittorrent-nox@.service
%files
%license COPYING
%doc Changelog README.md AUTHORS
%{_bindir}/qbittorrent
%{_datadir}/applications/org.qbittorrent.qBittorrent.desktop
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps
%dir %{_datadir}/icons/hicolor/*/status
%{_datadir}/icons/hicolor/*/apps/qbittorrent.png
%{_datadir}/icons/hicolor/*/status/qbittorrent-tray.png
%{_datadir}/icons/hicolor/scalable/status/qbittorrent-tray*.svg
%{_datadir}/icons/hicolor/scalable/apps/qbittorrent.svg
%{_datadir}/metainfo/org.qbittorrent.qBittorrent.metainfo.xml
%{_mandir}/man?/qbittorrent.?%{?ext_man}
%{_mandir}/ru/man?/qbittorrent.?%{?ext_man}
%files nox
%license COPYING
%doc Changelog README.md AUTHORS
%{_bindir}/qbittorrent-nox
%{_sbindir}/rcqbittorrent-nox
%{_unitdir}/qbittorrent-nox@.service
%{_mandir}/man?/qbittorrent-nox.?%{?ext_man}
%{_mandir}/ru/man?/qbittorrent-nox.?%{?ext_man}
%changelog