File feathercoin.spec of Package feathercoin

# spec file for package feathercoin
# Copyright (c) 2013-2018 Peter Conrad
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:		feathercoin
Release:	1
License:	MIT
Summary:	P2P digital currency
Group:		Productivity/Networking/Other
Source1:	%{name}.desktop
Source2:	%{name}d-safe
Source3:	%{name}d.apparmor
# Originally from
Patch:		secp256k1-keycpp-patch-fedora-openssl
BuildRequires:	boost-devel libcurl-devel autoconf automake
%if 0%{?suse_version} > 0
BuildRequires:	libminiupnpc-devel
BuildRequires:	qrencode-devel
BuildRequires:	libjansson-devel
BuildRequires:	libdb-4_8-devel
BuildRequires:	apparmor-parser
BuildRequires:	update-desktop-files
BuildRequires:	libqt5-qtbase-devel
BuildRequires:	protobuf-devel
BuildRequires:	libopenssl-devel
BuildRequires:	libevent-devel
%if 0%{?fedora} > 0
BuildRequires:	miniupnpc-devel
BuildRequires:	qrencode-devel
BuildRequires:	libdb4-cxx-devel
BuildRequires:	jansson-devel
BuildRequires:	gcc-c++
BuildRequires:	db4-devel
BuildRequires:	libjansson-devel-static
%if 0%{?fedora} < 20
BuildRequires:	libopenssl-ecc-devel
BuildRequires:	libopenssl-devel
BuildRequires:	qt-devel
BuildRequires:	libtool
BuildRoot:	%{_tmppath}/%{name}-%{version}-build

FeatherCoin is a fork of Litecoin using its latest build.

One of Litecoin’s biggest advantages is the Scrypt-based hashing algorithm.
This offers a different solution to Bitcoin, while still being able to run
on GPUs. There are many Bitcoin forks using the original hashing algorithm,
but with the advent of ASIC mining hardware, we are starting to see how much
trouble they can cause. ASIC mining hardware is expensive, but outperforms
GPU hardware and will eventually make GPU Bitcoin mining redundant.  Scrypt
based crypto currency is safe guarded from the effects of ASIC mining.

Feathercoin had an initial block reward of 200 coins and will have a total of
336 million coins. This makes it four times that of LiteCoin, this is the
same position that LiteCoin was set against BitCoin.

* Default port is 9336
  Forwarding this port can help if you have connection problems
* Default RPC port is 9337
  This is the port is point your miners towards if solo mining
* 1 minute block target
* difficulty retarget in every block
* 9% maximum change on difficulty retarget
* Block reward halves every 2100000 blocks (currently 80 FTC)
* NeoScrypt hashing algorithm (from block 432000 on)

This package contains the daemon only.

Please send donations to package maintainer: 6oatW3gwaccgQBZwMP7PWSBKwt8fkquPjr

#%%package gui
#Summary:	GUI application for FeatherCoin
#Group:		Productivity/Networking/Other
#%%description gui
#FeatherCoin is a fork of Litecoin using its latest build.
#This package contains the gui application and desktop integration.
#Please send donations to package maintainer: 6oatW3gwaccgQBZwMP7PWSBKwt8fkquPjr

%setup -q -n Feathercoin-%{version}
%if 0%{?fedora} >= 20
%patch -p0
# Fix for newer miniupnp:
%__sed -i '/0, "TCP/s/0)/0, "0")/' src/net.cpp
if grep 'define.*MINIUPNPC_API_VERSION.*1[4-9]' /usr/include/miniupnpc/miniupnpc.h; then
    %__sed -i '/upnpDiscover/s/&error/2, &/' src/net.cpp

%configure --enable-tests=no --with-gui=no --with-qrcode=yes --with-incompatible-bdb
%__make %{?_smp_mflags}

%__make DESTDIR="%{buildroot}" install
%if 0%{?suse_version} > 0
%__install -m 0755 "%{S:2}" "%{buildroot}%{_bindir}"
%__install -dm 755 "%{buildroot}%{_sysconfdir}/apparmor.d"
%__install -m 644 "%{S:3}" "%{buildroot}%{_sysconfdir}/apparmor.d/usr.bin.%{name}d-safe"
rm -rf "%{buildroot}"/usr/include "%{buildroot}"/usr/lib*

%if 0%{?suse_version} > 0
#%%suse_update_desktop_file -i %{name}
#%__install -dm 755 "%{buildroot}%{_datadir}/applications/"
#%__install -m 644 "%{S:1}" "%{buildroot}%{_datadir}/applications/"
#%__install -dm 755 "%{buildroot}%{_datadir}/pixmaps/"
#%__install -m 644 src/qt/res/icons/bitcoin.png "%{buildroot}%{_datadir}/pixmaps/%{name}.png"


%doc COPYING doc/ doc/
%if 0%{?suse_version} > 0
%config %{_sysconfdir}/apparmor.d/usr.bin.%{name}d-safe

#%%files gui