%define _hardened_build 1 %global forgeurl https://github.com/bitcoin-cash-node/bitcoin-cash-node Version: 0.21.2 %forgemeta Name: bitcoin-cash-node Release: 1%{?dist} Summary: A Peer-to-Peer Electronic Cash System License: MIT URL: https://bitcoincashnode.org/ Source: %{forgesource} #Minimal build requirements BuildRequires: boost-devel cmake gcc-c++ libevent-devel miniupnpc-devel ninja-build openssl-devel python3 zeromq-devel BuildRequires: systemd-rpm-macros %package libs Summary: A Peer-to-Peer Electronic Cash System %package devel Summary: A Peer-to-Peer Electronic Cash System Requires: bitcoin-cash-node-libs%{?_isa} = %{version}-%{release} %package utils Summary: A Peer-to-Peer Electronic Cash System %package seeder Summary: A Peer-to-Peer Electronic Cash System %package server Summary: A Peer-to-Peer Electronic Cash System Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires(pre): shadow-utils Requires: openssl-libs Requires: bitcoin-cash-node-utils%{_isa} = %{version} %description Bitcoin Cash is a digital cryptographic currency that uses peer-to-peer technology to operate with no central authority or banks; managing transactions and the issuing of bitcoins is carried out collectively by the network. This package contains the Qt based graphical client and node. If you are looking to run a Bitcoin Cash Node wallet, this is probably the package you want. %description libs This package provides the bitcoinconsensus shared libraries. These libraries may be used by third party software to provide consensus verification functionality. Unless you know need this package, you probably do not. %description devel This package contains the header files and static library for the bitcoinconsensus shared library. If you are developing or compiling software that wants to link against that library, then you need this package installed. Most people do not need this package installed. %description utils Bitcoin is an experimental new digital currency that enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate with no central authority: managing transactions and issuing money are carried out collectively by the network. This package provides bitcoin-cli, a utility to communicate with and control a Bitcoin server via its RPC protocol, and bitcoin-tx, a utility to create custom Bitcoin transactions. %description seeder Bitcoin-seeder is a crawler for the Bitcoin network, which exposes a list of reliable nodes via a built-in DNS server. %description server This package provides a stand-alone Bitcoin Cash Node daemon. For most users, this package is only needed if they need a full-node without the graphical client. Some third party wallet software will want this package to provide the actual Bitcoin Cash Node node they use to connect to the network. If you use the graphical Bitcoin Cash Node client then you almost certainly do not need this package. %prep %forgesetup %build mkdir build pushd build %cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_BITCOIN_WALLET=OFF -DBUILD_BITCOIN_QT=OFF -GNinja .. %ninja_build popd %check pushd build %{__ninja} check %{__ninja_common_opts} popd %install pushd build %ninja_install popd # Install ancillary files install -D -m640 -p contrib/debian/examples/bitcoin.conf %{buildroot}%{_sysconfdir}/bitcoin/bitcoin.conf install -D -m644 -p contrib/init/bitcoind.service %{buildroot}%{_unitdir}/bitcoind.service install -d -m750 -p %{buildroot}%{_localstatedir}/lib/bitcoind install -D -m644 -p doc/man/bitcoind.1 %{buildroot}%{_mandir}/man1/bitcoind.1 install -D -m644 -p doc/man/bitcoin-cli.1 %{buildroot}%{_mandir}/man1/bitcoin-cli.1 install -D -m644 -p doc/man/bitcoin-tx.1 %{buildroot}%{_mandir}/man1/bitcoin-tx.1 %pre server getent group bitcoin >/dev/null || groupadd -r bitcoin getent passwd bitcoin >/dev/null || useradd -r -g bitcoin -d /var/lib/bitcoind -s /sbin/nologin \ -c "Bitcoin node" bitcoin exit 0 %post %systemd_post bitcoind.service %preun %systemd_preun bitcoind.service %postun %systemd_postun_with_restart bitcoind.service %files %files libs %license COPYING %doc doc/README.md doc/shared-libraries.md %{_libdir}/libbitcoinconsensus.so* %{_libdir}/libsecp256k1.a %files devel %license COPYING %doc doc/README.md doc/developer-notes.md doc/shared-libraries.md %{_includedir}/bitcoinconsensus.h %{_includedir}/secp256k1*.h %files utils %license COPYING %doc doc/README.md %{_bindir}/bitcoin-cli %{_bindir}/bitcoin-tx %{_mandir}/man1/bitcoin-cli.1* %{_mandir}/man1/bitcoin-tx.1* %files seeder %license COPYING %{_bindir}/bitcoin-seeder %files server %license COPYING %doc README.md doc/assets-attribution.md doc/bips.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md %dir %attr(750,bitcoin,bitcoin) %{_localstatedir}/lib/bitcoind %dir %attr(750,bitcoin,bitcoin) %{_sysconfdir}/bitcoin %config %attr(640,bitcoin,bitcoin) %{_sysconfdir}/bitcoin/bitcoin.conf %{_bindir}/bitcoind %{_unitdir}/bitcoind.service %{_mandir}/man1/bitcoind.1* %changelog * Sun Jul 19 2020 Jonny Heggheim - 0.21.2-1 - Initial package