Name: qbittorrent Summary: A Bittorrent Client Version: 4.3.8 #epel using epoch 1 Epoch: 1 Release: 1%{?dist} License: GPLv2+ URL: http://www.qbittorrent.org %undefine _disable_source_fetch %define debug_package %nil Source0: https://github.com/qbittorrent/qBittorrent/archive/release-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glibc-devel,ninja-build BuildRequires: libtorrent-rasterbar-devel %if 0%{?rhel} ==7 BuildRequires: qt514-devel,qt514-linguist, boost171,kloxo-openssl,la-zlib-devel BuildRequires: cmake3 BuildRequires: devtoolset-9-gcc-c++ Requires: libQt5Core.so.5(Qt_5.14)(64bit) %define cmakeinstall cmake3 -DOPENSSL_ROOT_DIR=/usr/local/openssl -DCMAKE_CXX_FLAGS=-lpthread\ -L/usr/local/boost171/lib64\ -I/usr/local/boost171/include -DCMAKE_PREFIX_PATH=/usr -DZLIB_ROOT=/usr/local/zlib -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-9/root/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-9/root/bin/gcc %endif %if 0%{?rhel} ==8 BuildRequires: qt5-qtbase-devel,qt5-linguist,boost, boost-devel,boost-python3-devel,zlib-devel,systemd-devel BuildRequires: openssl-devel BuildRequires: cmake BuildRequires: gcc, gcc-c++ %define cmakeinstall cmake %endif %description A Bittorrent client using rb_libtorrent and a Qt4 Graphical User Interface. It aims to be as fast as possible and to provide multi-OS, unicode support. %prep %setup -qn qBittorrent-release-%{version} %build mkdir build pushd build #-DCMAKE_PREFIX_PATH= %{cmakeinstall} \ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ -DGUI=0 -DSYSTEMD=1 -DWEBUI=1 \ -DVERBOSE_CONFIGURE=1 \ -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=Release -G Ninja .. ninja %{?_smp_mflags} #export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/local/qt514/lib/pkgconfig/:/usr/local/openssl/lib/pkgconfig:/usr/local/zlib/lib64/pkgconfig #./configure --prefix=/usr --disable-gui --enable-systemd --disable-qt-dbus --enable-debug --with-boost=/usr/local/boost171 %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT DESTDIR=$RPM_BUILD_ROOT ninja -C build install %check %if 0%{?rhel} ==8 ninja -C build test %{?_smp_mflags} || exit 0 %endif %post %systemd_post if [ $1 == 1 ];then echo " ————————————————————————————————————————" echo "|Usage: |" echo "|systemctl start qbittorrent-nox@'user' |" echo " ————————————————————————————————————————" fi %postun %systemd_post #%posttrans %files %license COPYING %doc README.md NEWS AUTHORS TODO Changelog /usr/bin/qbittorrent-nox /usr/lib/systemd/system/qbittorrent-nox@.service /usr/share/man/man1/qbittorrent-nox.1.gz