# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: p2pool Version: 17.0 Release: 1%{?dist} Summary: Peer-to-peer Bitcoin mining pool License: GPLv3 URL: http://p2pool.in Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz BuildArch: noarch Requires: pyOpenSSL Requires: SOAPpy Requires: python2-fpconst Requires: python2-twisted %global mainfile run_%{name}.py %description P2Pool is a decentralized Bitcoin mining pool that works by creating a peer-to-peer network of miner nodes. As opposed to usual pools, P2Pool helps to secure Bitcoin against double-spending and 51% attacks. P2Pool's initial setup requires a little more effort but provides equivalent payouts with a higher variance and no need for trust in a pool operator. %prep %setup -q # Unbundle the bundled: rm -r SOAPpy rm -r fpconst.py %build %install rm -rf %{buildroot} cp -r %{name} %{buildroot}/%{python_sitelib} install -D -m 755 %{mainfile} %{buildroot}/%{_sbindir}/%{mainfile} %files %doc # For noarch packages: sitelib %{python_sitelib}/* %{_sbindir}/%{mainfile} %changelog * Sat Nov 18 2017 Vadim Raskhozhev - 17.0-1 - Initial package