File trezarcoin.spec of Package Trezarcoin

#
# spec file for package 
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

Name:           trezarcoin
Version:	0.13
Release:	0
License:	MIT	
Summary:	Port of Cryptocoin Wallet implementation for Trezarcoinwallet

Url:		https://github.com/Trezarcoin/Trezarcoin.git
Group:		Productivity/Office/Finance
Source0:	%{name}-%{version}.tar.gz
#Source1:	% { name }.desktop
#Icon:		% { name }.gif
#Patch:


%if 0%{?fedora} || 0%{?centos}
BuildRequires: miniupnpc-devel libdb-cxx-devel
BuildRequires: qt4-devel

%else
BuildRequires: libminiupnpc-devel
BuildRequires: libQt5Core-devel libQt5Gui-devel libQt5Network-devel libQt5Widgets-devel 
BuildRequires: libQt5PrintSupport-devel libqt5-qtbase-devel  libqt5-linguist  
BuildRequires: db-devel
Buildrequires: boost-devel libboost_system-devel libboost_filesystem-devel
BuildRequires:  libboost_program_options-devel libboost_thread-devel gcc-c++
BuildRequires: update-desktop-files 
%endif

BuildRequires:	autoconf automake libtool 
BuildRequires:  boost-devel >= 1.53  libboost_system-devel libboost_filesystem-devel libboost_program_options-devel 
BuildRequires:  libboost_thread-devel libboost_chrono-devel
BuildRequires:  gcc-c++ 
BuildRequires: 	protobuf-devel libevent-devel
BuildRequires:	qrencode-devel openssl-devel  
BuildRequires:  zeromq-devel

#Requires:	

Provides:	trezarcoin-qt = %{version} trezarcoind = %{version}
Obsoletes:	trezarcoin-qt < %{version} trezarcoind < %{version} 
#BuildRoot:     

%description
A Wallet for the cryptocoin Trezarcoin
Original sources and actual versions of the source can be found at: https://github.com/Trezarcoin/Trezarcoin

Trezarcoin is an Open Source cryptographic Internet currency

For more information visit http://www.trezarcoin.com

 
 If you want to support the Trezarcoin development donate to: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
 
 
 
%package -n trezarcoin-qt
Group:Productivity/Office/Finance
Summary: Trezarcoin GUI
%description -n trezarcoin-qt
The GUI interface to the Trezarcoin wallet. It's designed for end users running an X11 environment


%package -n trezarcoind
Group: Productivity/Office/Finance
Summary: The trezarcoin daemon and command line interface 
 
%description -n trezarcoind
The daemon and command line interface for the Trezarcoin wallet. The daemon can be used for server 
only environments, e.g. by pool operators.
The command line interface provides command line access to the wallet functions without the need of 
a X11 environment.
 
%prep

%setup -n trezarcoin-%{version}

%build
#echo "starting build section"
#echo "snmp_flags: %{?_smp_mflags}"

./autogen.sh
export QT_SELECT=5 
# original configure statemment
#./configure  --disable-tests --with-incompatible-bdb  --enable-static=no --with-gui=qt5 --with-qt-bindir=/usr/bin CFLAGS="-fPIC"
./configure  --disable-tests --with-incompatible-bdb  --enable-shared=no CFLAGS="-fPIC" 

#PreReq:

#compile the forms into ui_ headerfiles
#cd contrib
#qmake trezarcoin-qt.pro  
#qmake bitcoin-qt.pro  
#make compiler_uic_make_all 
#mv ui_* ../src/qt/forms/
#cd -

# build the executables
make

%pre -n trezarcoind


%install 

install -D -m 0755 src/%{name}d %{buildroot}%{_bindir}/%{name}d
install -D -m 0755 src/%{name}-cli %{buildroot}%{_bindir}/%{name}-cli


install -D -m 0755 src/qt/%{name}-qt %{buildroot}%{_bindir}/%{name}-qt
install -p -D -m 644 share/pixmaps/bitcoin32.png %{buildroot}/usr/share/icons/%{name}32.png
install -p -D -m 644 share/pixmaps/bitcoin64.png %{buildroot}/usr/share/icons/%{name}64.png
install -p -D -m 644 share/pixmaps/bitcoin64.png %{buildroot}/usr/share/pixmaps/%{name}.png
install -p -D -m 644 ../../SOURCES/%{name}.desktop  %{buildroot}/usr/share/applications/%{name}.desktop
pwd

install -p -D -m 644 contrib/debian/manpages/trezarcoin-qt.1  %{buildroot}%{_mandir}/man1/%{name}-qt.1
install -p -D -m 644 contrib/debian/manpages/trezarcoind.1  %{buildroot}%{_mandir}/man1/%{name}d.1
install -p -D -m 644 contrib/debian/manpages/trezarcoind.1  %{buildroot}%{_mandir}/man1/%{name}-cli.1
install -p -D -m 644 contrib/debian/manpages/trezarcoin.conf.5  %{buildroot}%{_mandir}/man5/%{name}.conf.5

%if 0%{?suse_version}
%suse_update_desktop_file -i %{name} Office Finance
%endif
#%%make_install

%post
echo "post"
%postun

%files 
%defattr (-,root,root,-)
%{_bindir}/trezarcoind
%{_bindir}/trezarcoin-qt
%{_bindir}/trezarcoin-cli
#/usr/share/applications/%{name}.desktop
/%{_mandir}/man1/trezarcoin-qt.1.gz
/%{_mandir}/man1/trezarcoin-cli.1.gz
/%{_mandir}/man1/trezarcoind.1.gz
/%{_mandir}/man5/trezarcoin.conf.5.gz
#%{_mandir}/%{name}
/usr/share/icons/%{name}32.png
/usr/share/icons/%{name}64.png
/usr/share/pixmaps/%{name}.png
/usr/share/applications/%{name}.desktop


%defattr(-,root,root)



%changelog
* Tue Dec 04 2018 wellenreiter01@t-online.de
- version 1.2
  *  update to code based on bitcoin code v0.13