%undefine __cmake_in_source_build %global forgeurl https://github.com/bitcoin-cash-node/bitcoin-cash-node Name: bitcoin-cash-node Version: 22.1.0 Release: 2%{?dist} Summary: Bitcoin Cash Node License: MIT URL: https://bitcoincashnode.org/ %forgemeta Source: %{forgesource} Source1: https://gitlab.com/bitcoin-cash-node/bchn-sw/packaging/-/raw/master/debian/examples/bitcoin.conf Source3: https://gitlab.com/bitcoin-cash-node/bchn-sw/packaging/-/raw/master/debian/bitcoin-qt.desktop Patch0: https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/merge_requests/824.diff #Minimal build requirements BuildRequires: boost-devel cmake gcc-c++ libevent-devel miniupnpc-devel ninja-build openssl-devel python3 zeromq-devel #Wallet BuildRequires: libdb-cxx-devel libdb-devel #Qt BuildRequires: qt5-qttools-devel qt5-qtbase-devel protobuf-devel qrencode-devel BuildRequires: desktop-file-utils BuildRequires: git BuildRequires: systemd-rpm-macros %package qt Summary: GUI wallet %package libs Summary: Bitcoin Cash Node library %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(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. %description qt 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 %patch0 -p1 %build %cmake -DBUILD_SHARED_LIBS:BOOL=OFF -GNinja %ninja_build -C "%{_vpath_builddir}" %check #%{__ninja} -C "%{_vpath_builddir}" check %{__ninja_common_opts} %install %ninja_install -C "%{_vpath_builddir}" install -D -m640 -p %{SOURCE1} %{buildroot}%{_sysconfdir}/bitcoin/bitcoin.conf install -D -m644 -p contrib/init/bitcoind.service %{buildroot}%{_unitdir}/bitcoind.service install -dm 750 %{buildroot}/%{_sharedstatedir}/bitcoind install -d -m750 -p %{buildroot}%{_localstatedir}/lib/bitcoind #qt install -Dm644 share/pixmaps/bitcoin128.xpm %{buildroot}%{_datadir}/pixmaps/bitcoin128.xpm desktop-file-install -m 644 --dir=%{buildroot}%{_datadir}/applications %{SOURCE3} %pre server getent group bitcoin >/dev/null || groupadd -r bitcoin getent passwd bitcoin >/dev/null || useradd -r -g bitcoin -d %{_sharedstatedir}/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 qt %license COPYING %doc doc/README.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md %{_bindir}/bitcoin-qt %{_datadir}/applications/bitcoin-qt.desktop %{_datadir}/pixmaps/bitcoin128.xpm %{_mandir}/man1/bitcoin-qt.1* %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 doc/README.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md %dir %attr(750,bitcoin,bitcoin) %{_sharedstatedir}/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 Oct 18 2020 Jonny Heggheim - 22.1.0-2 - Include fix ODR violation leading to subtle build error * Fri Oct 16 2020 Jonny Heggheim - 22.1.0-1 - Updated to version 22.1.0 * Tue Aug 18 2020 Jonny Heggheim - 22.0.0-1 - Updated to version 22.0.0 * Sun Jul 19 2020 Jonny Heggheim - 0.21.2-1 - Initial package