Forked from https://src.fedoraproject.org/rpms/rb_libtorrent.git to build for RHEL/CentOS 8
See https://github.com/chrisdevchroma/build-packages-docker/blob/master/rb_libtorrent.sh for a automated script.
- Install the Development tools (includes rpm-build)
sudo dnf group install "Development Tools"
- Install rpmdevtools (for spectool)
sudo dnf install rpmdevtools
- Install rb_libtorrent build dependencies
sudo dnf install boost-devel boost-python3-devel chrpath python3-devel
- Build & install dependency asio-devel -> see https://github.com/chrisdevchroma/asio-rhel
- Clone repo with git and cd into the folder
cd rb_libtorrent-rhel
- Create build/SOURCES dir
mkdir -p build/SOURCES
- Download rb_libtorrent source tarball with spectool
spectool -g -C build/SOURCES rb_libtorrent.spec
- Copy patches into build/SOURCES
cp *.patch *COPYING* *README*.Fedora build/SOURCES
- Build package with rpmbuild
rpmbuild --define "_topdir `pwd`/build" -ba rb_libtorrent.spec
- Install rb_libtorrent and rb_libtorrent-python3 packages
sudo dnf install ./build/RPMS/x86_64/rb_libtorrent-[[:digit:]]*.el8.x86_64.rpm
sudo dnf install ./build/RPMS/x86_64/rb_libtorrent-python3-[[:digit:]]*.el8.x86_64.rpm