Summary: Feathercoin - a peer-to-peer currency
Summary(pl.UTF-8): Feathercoin - waluta peer-to-peer
Name: feathercoin
-Version: 0.9.6
-Release: 1
+Version: 0.19.1
+Release: 9
License: MIT
Group: Applications/Networking
#Source0Download: https://github.com/FeatherCoin/Feathercoin/releases
Source0: https://github.com/FeatherCoin/Feathercoin/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 9ac8509ab7bc7fb39b8e9d474a1079e3
-Patch0: %{name}-c++.patch
-Patch1: %{name}-zxing.patch
-Patch2: x32.patch
+# Source0-md5: 5af573e26b1fc7cb57ef5efc5dd88801
+Patch0: lib.patch
+Patch1: qt-5.15.patch
+Patch2: %{name}-includes.patch
+Patch3: %{name}-univalue.patch
+Patch4: missing-includes.patch
URL: https://www.feathercoin.com/
%if %{with gui}
BuildRequires: Qt5Core-devel >= 5
%endif
BuildRequires: autoconf >= 2.69
BuildRequires: automake
-BuildRequires: boost-devel
+BuildRequires: boost-devel >= 1.47.0
%{?with_ccache:BuildRequires: ccache}
BuildRequires: db-cxx-devel >= 4.8
BuildRequires: gettext-tools
+BuildRequires: libevent-devel
%{?with_gui:BuildRequires: libpng-devel}
-BuildRequires: libstdc++-devel
+BuildRequires: libsecp256k1-devel >= 0.1.0.15
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libtool >= 2:2
+BuildRequires: libunivalue-devel >= 1.0.4
BuildRequires: miniupnpc-devel >= 1.5
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: protobuf-devel
+BuildRequires: python3 >= 1:3.5
BuildRequires: qrencode-devel
%{?with_gui:BuildRequires: qt5-build >= 5}
-BuildRequires: zxing-cpp-devel
+BuildRequires: zeromq-devel >= 4
%{?with_gui:BuildRequires: zlib-devel}
+BuildRequires: zxing-cpp-devel
+Requires: libsecp256k1 >= 0.1.0.15
+Requires: libunivalue >= 1.0.4
Requires: perl-base
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# uses nNeoScryptOptions symbol from binaries
+%define skip_post_check_so libbitcoinconsensus.so.*
+
%description
Feathercoin is a peer-to-peer currency. Peer-to-peer means that no
central authority issues new money or tracks transactions. These tasks
centralnego urzędu, który emituje nowe pieniądze czy śledzi
transakcje. Zadania te są obsługiwane zespołowo przez sieć.
+%package devel
+Summary: Header file for bitcoinconsensus library
+Summary(pl.UTF-8): Plik nagłówkowy biblioteki bitcoinconsensus
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: openssl-devel
+Conflicts: bitcoin-devel
+
+%description devel
+Header file for bitcoinconsensus library.
+
+%description devel -l pl.UTF-8
+Plik nagłówkowy biblioteki bitcoinconsensus.
+
+%package static
+Summary: Static bitcoinconsensus library
+Summary(pl.UTF-8): Statyczna biblioteka bitcoinconsensus
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Conflicts: bitcoin-static
+
+%description static
+Static bitcoinconsensus library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka bitcoinconsensus.
+
%package qt
Summary: Qt-based Feathercoin Wallet
Summary(pl.UTF-8): Oparty na Qt portfel Feathercoin
%setup -q -n Feathercoin-%{version}
%patch0 -p1
%patch1 -p1
-%ifarch x32
%patch2 -p1
-%endif
+%patch3 -p1
+%patch4 -p1
%build
-install -d src/build-aux
-%{__aclocal} -I m4
+%{__libtoolize}
+%{__aclocal}
%{__autoconf}
%{__autoheader}
%{__automake}
# --with-gui defaults to qt4, but it doesn't build (QJsonObject is required)
%configure \
+ --disable-bench \
+ --enable-bip70 \
--enable-ccache%{!?with_ccache:=no} \
+ --disable-gui-tests \
--disable-silent-rules \
+ --disable-tests \
+ --with-gui=%{?with_gui:qt5}%{!?with_gui:no} \
--with-incompatible-bdb \
- --with-gui=%{?with_gui:qt5}%{!?with_gui:no}
+ --with-system-univalue
%{__make}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_mandir}/man{1,5},%{_desktopdir},%{_datadir}/kde4/services}
-sed -e 's#bitcoin#feathercoin#g;s#Bitcoin#Feathercoin#g' contrib/debian/bitcoin-qt.desktop > $RPM_BUILD_ROOT%{_desktopdir}/feathercoin-qt.desktop
-sed -e 's#bitcoin#feathercoin#g' contrib/debian/bitcoin-qt.protocol > $RPM_BUILD_ROOT%{_datadir}/kde4/services/feathercoin-qt.protocol
-cp -p contrib/debian/manpages/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
-cp -p contrib/debian/manpages/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbitcoinconsensus.la
+
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_datadir}/kde4/services}
+cat <<EOF >$RPM_BUILD_ROOT%{_desktopdir}/feathercoin-qt.desktop
+[Desktop Entry]
+Encoding=UTF-8
+Name=Feathercoin
+Comment=Feathercoin P2P Cryptocurrency
+Comment[fr]=Feathercoin, monnaie virtuelle cryptographique pair à pair
+Comment[pl]=Feathercoin - kryptowaluta P2P
+Comment[tr]=Feathercoin, eşten eşe kriptografik sanal para birimi
+Exec=feathercoin-qt %u
+Terminal=false
+Type=Application
+Icon=bitcoin128
+MimeType=x-scheme-handler/feathercoin;
+Categories=Office;Finance;
+EOF
+
+cat <<EOF >$RPM_BUILD_ROOT%{_datadir}/kde4/services/feathercoin-qt.protocol
+[Protocol]
+exec=feathercoin-qt '%u'
+protocol=feathercoin
+input=none
+output=none
+helper=true
+listing=
+reading=false
+writing=false
+makedir=false
+deleting=false
+EOF
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
-%doc COPYING README.md doc/*.txt contrib/debian/examples/bitcoin.conf
+%doc COPYING README.md doc/*.txt
%attr(755,root,root) %{_bindir}/feathercoin-cli
+%attr(755,root,root) %{_bindir}/feathercoin-tx
+%attr(755,root,root) %{_bindir}/feathercoin-wallet
%attr(755,root,root) %{_bindir}/feathercoind
-%attr(755,root,root) %{_bindir}/test_bitcoin
%{_mandir}/man1/feathercoin-cli.1*
+%{_mandir}/man1/feathercoin-tx.1*
+%{_mandir}/man1/feathercoin-wallet.1*
%{_mandir}/man1/feathercoind.1*
-%{_mandir}/man5/feathercoin.conf.5*
+%attr(755,root,root) %{_libdir}/libbitcoinconsensus.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbitcoinconsensus.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libbitcoinconsensus.so
+%{_includedir}/bitcoinconsensus.h
+%{_pkgconfigdir}/libbitcoinconsensus.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libbitcoinconsensus.a
%files qt
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/feathercoin-qt
-%attr(755,root,root) %{_bindir}/test_bitcoin-qt
%{_datadir}/kde4/services/feathercoin-qt.protocol
%{_desktopdir}/feathercoin-qt.desktop
%{_mandir}/man1/feathercoin-qt.1*