[packages/feathercoin] - updated to 0.9.6 - added c++ patch (fix constructor ambiguity issue) - added zxing patch (fix priv
qboosh
qboosh at pld-linux.org
Sun Apr 16 22:55:42 CEST 2017
commit d71863a96b85d9627e1db8a32a0895a7a5292d9a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Apr 16 22:55:54 2017 +0200
- updated to 0.9.6
- added c++ patch (fix constructor ambiguity issue)
- added zxing patch (fix private fields usage)
feathercoin-c++.patch | 11 ++++++
feathercoin-zxing.patch | 18 ++++++++++
feathercoin.spec | 96 ++++++++++++++++++++++++++++++++-----------------
3 files changed, 93 insertions(+), 32 deletions(-)
---
diff --git a/feathercoin.spec b/feathercoin.spec
index 28135ed..aa3f1ff 100644
--- a/feathercoin.spec
+++ b/feathercoin.spec
@@ -1,22 +1,47 @@
+# NOTE: "portable wallet" wants BDB 4.8
+#
+# Conditional build:
+%bcond_with ccache # use ccache for building
+%bcond_without gui # Qt5 GUI
+
Summary: Feathercoin - a peer-to-peer currency
Summary(pl.UTF-8): Feathercoin - waluta peer-to-peer
Name: feathercoin
-Version: 0.0.1
-Release: 9
-License: MIT/X11
-Group: X11/Applications
-Source0: https://github.com/FeatherCoin/FeatherCoin/archive/master.zip?/%{name}-%{version}.zip
-# Source0-md5: 9662befa9e33b7ab7ded60d41cd12eea
+Version: 0.9.6
+Release: 1
+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
URL: https://www.feathercoin.com/
-BuildRequires: QtCore-devel >= 4
-BuildRequires: QtDBus-devel >= 4
-BuildRequires: QtGui-devel >= 4
+%if %{with gui}
+BuildRequires: Qt5Core-devel >= 5
+BuildRequires: Qt5DBus-devel >= 5
+BuildRequires: Qt5Gui-devel >= 5
+BuildRequires: Qt5Network-devel >= 5
+BuildRequires: Qt5PrintSupport-devel >= 5
+BuildRequires: Qt5Test-devel >= 5
+BuildRequires: Qt5Widgets-devel >= 5
+%endif
+BuildRequires: autoconf >= 2.69
+BuildRequires: automake
BuildRequires: boost-devel
-BuildRequires: db-cxx-devel
+%{?with_ccache:BuildRequires: ccache}
+BuildRequires: db-cxx-devel >= 4.8
+BuildRequires: gettext-tools
+%{?with_gui:BuildRequires: libpng-devel}
+BuildRequires: libstdc++-devel
BuildRequires: miniupnpc-devel >= 1.5
BuildRequires: openssl-devel
+BuildRequires: pkgconfig
+BuildRequires: protobuf-devel
BuildRequires: qrencode-devel
-BuildRequires: qt4-qmake >= 4
+%{?with_gui:BuildRequires: qt5-build >= 5}
+BuildRequires: zxing-cpp-devel
+%{?with_gui:BuildRequires: zlib-devel}
Requires: perl-base
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -42,47 +67,54 @@ Qt-based Feathercoin Wallet.
Oparty na Qt portfel Feathercoin.
%prep
-%setup -q -c
+%setup -q -n Feathercoin-%{version}
+%patch0 -p1
+%patch1 -p1
%build
-cd FeatherCoin-master
-qmake-qt4 \
- USE_UPNP=1 \
- USE_DBUS=1 \
- USE_QRCODE=1
+install -d src/build-aux
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+# --with-gui defaults to qt4, but it doesn't build (QJsonObject is required)
+%configure \
+ --enable-ccache%{!?with_ccache:=no} \
+ --disable-silent-rules \
+ --with-incompatible-bdb \
+ --with-gui=%{?with_gui:qt5}%{!?with_gui:no}
%{__make}
-%{__make} -C src -f makefile.unix \
- CXX="%{__cxx}" \
- CXXFLAGS="%{rpmcflags} %{rpmcxxflags} %{rpmcppflags}"
-
%install
rm -rf $RPM_BUILD_ROOT
-cd FeatherCoin-master
-
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_mandir}/man{1,5},%{_localedir},%{_desktopdir},%{_pixmapsdir},%{_datadir}/kde4/services}
-install src/feathercoind $RPM_BUILD_ROOT%{_libdir}/%{name}/feathercoind
-sed -e 's#/usr/lib/#%{_libdir}/#g' -e 's#bitcoin#feathercoin#g' contrib/debian/bin/bitcoind > $RPM_BUILD_ROOT%{_bindir}/feathercoind
-chmod 755 $RPM_BUILD_ROOT%{_bindir}/feathercoind
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-install feathercoin-qt $RPM_BUILD_ROOT%{_bindir}
-sed -e 's#bitcoin#feathercoin#g' contrib/debian/bitcoin-qt.desktop > $RPM_BUILD_ROOT%{_desktopdir}/feathercoin-qt.desktop
+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
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc FeatherCoin-master/doc/*.txt FeatherCoin-master/contrib/debian/examples/bitcoin.conf
+%doc COPYING README.md doc/*.txt contrib/debian/examples/bitcoin.conf
+%attr(755,root,root) %{_bindir}/feathercoin-cli
%attr(755,root,root) %{_bindir}/feathercoind
-%dir %{_libdir}/%{name}
-%attr(755,root,root) %{_libdir}/%{name}/feathercoind
+%attr(755,root,root) %{_bindir}/test_bitcoin
+%{_mandir}/man1/feathercoin-cli.1*
+%{_mandir}/man1/feathercoind.1*
+%{_mandir}/man5/feathercoin.conf.5*
%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*
diff --git a/feathercoin-c++.patch b/feathercoin-c++.patch
new file mode 100644
index 0000000..5900745
--- /dev/null
+++ b/feathercoin-c++.patch
@@ -0,0 +1,11 @@
+--- Feathercoin-0.9.6/src/db.cpp.orig 2017-04-16 13:38:15.712488228 +0200
++++ Feathercoin-0.9.6/src/db.cpp 2017-04-16 13:38:19.465821520 +0200
+@@ -44,7 +44,7 @@
+ if (ret != 0)
+ LogPrintf("CDBEnv::EnvShutdown : Error %d shutting down database environment: %s\n", ret, DbEnv::strerror(ret));
+ if (!fMockDb)
+- DbEnv(0).remove(path.string().c_str(), 0);
++ DbEnv(0u).remove(path.string().c_str(), 0);
+ }
+
+ CDBEnv::CDBEnv() : dbenv(DB_CXX_NO_EXCEPTIONS)
diff --git a/feathercoin-zxing.patch b/feathercoin-zxing.patch
new file mode 100644
index 0000000..69a5d5e
--- /dev/null
+++ b/feathercoin-zxing.patch
@@ -0,0 +1,18 @@
+--- Feathercoin-0.9.6/src/qt/qimagesource.cpp.orig 2017-01-30 17:11:35.000000000 +0100
++++ Feathercoin-0.9.6/src/qt/qimagesource.cpp 2017-04-16 22:11:31.628803262 +0200
+@@ -16,11 +16,11 @@
+
+ ArrayRef<char> QImageLuminanceSource::getMatrix() const
+ {
+- ArrayRef<char> mymatrix(width*height);
+- for (int y = 0; y < height; y++)
++ ArrayRef<char> mymatrix(getWidth()*getHeight());
++ for (int y = 0; y < getHeight(); y++)
+ {
+- for (int x = 0; x < width; x++) {
+- mymatrix[y*width+x] = qGray(image.pixel(x, y));
++ for (int x = 0; x < getWidth(); x++) {
++ mymatrix[y*getWidth()+x] = qGray(image.pixel(x, y));
+ }
+ }
+ return mymatrix;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/feathercoin.git/commitdiff/d71863a96b85d9627e1db8a32a0895a7a5292d9a
More information about the pld-cvs-commit
mailing list