File bitcoin.spec of Package bitcoin
Name: bitcoin
Summary: Bitcoin P2P Virtual Currency
Version: 0.14.0
Release: 1%{?dist}
Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
License: MIT
Group: Applications/Internet
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
Vendor: Oleg Girko <ol@infoserver.lv>
Packager: Oleg Girko <ol@infoserver.lv>
Url: http://www.bitcoin.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: tar
BuildRequires: desktop-file-utils
BuildRequires: openssl-devel
BuildRequires: boost-devel
BuildRequires: libevent-devel
BuildRequires: libdb4-cxx-devel
BuildRequires: glib2-devel
BuildRequires: zlib-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qttools-devel
BuildRequires: miniupnpc-devel
BuildRequires: qrencode-devel
BuildRequires: protobuf-devel
BuildRequires: protobuf-compiler
BuildRequires: zeromq-devel
%description
Bitcoin is a peer-to-peer currency. Peer-to-peer means that no
central authority issues new money or tracks transactions.
These tasks are managed collectively by the network.
%package qt
Summary: GUI For Bitcoin P2P Virtual Currency
Group: Applications/Internet
%description qt
Bitcoin is a peer-to-peer currency. Peer-to-peer means that no
central authority issues new money or tracks transactions.
These tasks are managed collectively by the network.
This package contains GUI for using Bitcoin network.
%package libs
Summary: The shared consensus library for bitcoin P2P virtual currency
Group: Applications/Internet
%description libs
Bitcoin is a peer-to-peer currency. Peer-to-peer means that no
central authority issues new money or tracks transactions.
These tasks are managed collectively by the network.
This package contains consensus library for Bitcoin network.
%package devel
Summary: The bitcoin consensus library development files
Group: Development/Libraries
%description devel
Bitcoin is a peer-to-peer currency. Peer-to-peer means that no
central authority issues new money or tracks transactions.
These tasks are managed collectively by the network.
This package contains header and libraries needed to compile applications
using consensus library for Bitcoin network.
%prep
%setup -n %{name}-%{version}
%build
sh autogen.sh
%configure \
--with-miniupnpc \
--enable-upnp-default \
--with-qrencode \
--with-gui=qt5 \
--with-qtdbus \
CXXFLAGS="$RPM_OPT_FLAGS" \
make
sed "s|bitcoin128|bitcoin|g" \
< contrib/debian/bitcoin-qt.desktop \
> src/bitcoin-qt.desktop
%check
make check
%install
%make_install
install -m 644 -D src/qt/res/src/bitcoin.svg \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/bitcoin.svg
desktop-file-install src/bitcoin-qt.desktop \
--add-category=Network \
--dir %{buildroot}%{_datadir}/applications
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%{_bindir}/bitcoind
%{_bindir}/bitcoin-cli
%{_bindir}/bitcoin-tx
%{_bindir}/test_bitcoin
%{_bindir}/bench_bitcoin
%{_mandir}/man1/bitcoind.1*
%{_mandir}/man1/bitcoin-cli.1*
%{_mandir}/man1/bitcoin-tx.1*
%files qt
%defattr(-, root, root)
%{_bindir}/bitcoin-qt
%{_bindir}/test_bitcoin-qt
%{_datadir}/icons/hicolor/scalable/apps/bitcoin.svg
%{_datadir}/applications/bitcoin-qt.desktop
%{_mandir}/man1/bitcoin-qt.1*
%files libs
%defattr(-, root, root)
%{_libdir}/*.so.*
%files devel
%defattr(-, root, root)
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*