File feathercoin.spec of Package feathercoin
#
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
# program names
%define progname feathercoin
%define specname_core %{progname}
%define libname_core_ext %{nil}
# program base names
%define progbase %{progname}
# settings
%define specname %{specname_core}
%define specurl https://%{specname}.com/
%define speclicense MIT
%define currency_name Feathercoin
%define display_name FeatherCoin
%define libname_ext %{?libname_core_ext}
%define conf_src share/examples/bitcoin.conf
%define icon_src share/pixmaps/bitcoin256.png
%define service_src contrib/init/bitcoind.service
%define doc_list CONTRIBUTING.md README.md SECURITY.md
# conf replacements
%define currencyname_src Bitcoin
%define guiname_src Bitcoin-Qt
%define progname_src bitcoin
# port settings
%define p2p_port 9336
%define rpc_port 9337
# ancient program
%define ancient_name %{nil}
%define ancient_libname %{nil}
%define ancient_version %{nil}
# settings for dependencies
%define libdb_version 4_8
%define libunivalue_version 1.0
# options
%define with_bench 1
%if 0%{?suse_version} && ( 0%{?suse_version} == 1315 || 0%{?suse_version} > 1320 )
%define with_gui 1
%else
%define with_gui 0
%endif
%define with_libs 0
%define with_man 1
%define with_seeder 0
%define with_tests 1
%if 0%{?suse_version} && 0%{?suse_version} >= 1315
%define with_checks 1
%else
%define with_checks 0
%endif
%if 0%{?suse_version} && 0%{?suse_version} == 1310 && ( "%{__isa_name}" == "armv6l" || "%{__isa_name}" == "armv6hl" )
%define with_upnp 0
%else
%define with_upnp 1
%endif
%if 0%{?suse_version} && 0%{?suse_version} == 1320 && "%{_arch}" == "ppc64le"
%define with_asm 0
%else
%define with_asm 1
%endif
%define with_sse2 0
%define with_bash_support 0
%define with_bip70 0
%define with_docs_html 0
%define with_compiler_upgrade 0
%define with_ancient_program_support 0
%define with_package_conflict_support 0
%define with_legacy_package_support 0
%if 0%{?suse_version} && ( 0%{?suse_version} < 1500 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1500 && 0%{?sle_version} && 0%{?sle_version} <= 150200 ) )
%define with_susefirewall_support 1
%else
%define with_susefirewall_support 0
%endif
%define with_sys_univalue 1
Name: %{specname}
Version: 0.19.1.1
Release: 0
Summary: P2P digital currency
License: %{speclicense}
Group: Productivity/Networking/Other
URL: %{specurl}
Source0: %{name}-%{version}.tar.xz
Patch0: %{name}-boost.patch
BuildRequires: automake
%if 0%{?suse_version} && 0%{?suse_version} > 1320
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_system-devel
%if %{with_tests}
BuildRequires: libboost_test-devel
%endif
BuildRequires: libboost_thread-devel
%else
BuildRequires: boost-devel
%endif
BuildRequires: dos2unix
%if %{with_docs_html}
BuildRequires: doxygen
BuildRequires: graphviz
%endif
BuildRequires: fdupes
%if %{with_compiler_upgrade}
%if 0%{?suse_version} && 0%{?is_opensuse} && 0%{?suse_version} == 1315
%if 0%{?sle_version} && 0%{?sle_version} == 120300
BuildRequires: gcc8
BuildRequires: gcc8-c++
%else
BuildRequires: gcc5
BuildRequires: gcc5-c++
%endif
%endif
%endif
BuildRequires: libdb-%{libdb_version}-devel
BuildRequires: libevent-devel
%if %{with_upnp}
BuildRequires: libminiupnpc-devel
%endif
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: qrencode-devel
%if %{with_gui}
%if 0%{?suse_version} && 0%{?suse_version} >= 1315
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qttools-devel
%else
BuildRequires: libqt4-devel
%endif
%endif
%if %{with_sys_univalue}
BuildRequires: libunivalue-devel >= %{libunivalue_version}
%endif
BuildRequires: protobuf-devel
%if %{with_checks}
BuildRequires: python3
%endif
%if 0%{?suse_version} && ( 0%{?suse_version} == 1310 || 0%{?suse_version} == 1320 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1315 && 0%{?sle_version} && 0%{?sle_version} >= 120200 ) )
BuildRequires: shadow
%endif
%if %{with_gui}
BuildRequires: update-desktop-files
%endif
BuildRequires: zeromq-devel
%if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run
%endif
%define soname 0
%global qt4_version qt
%global qt5_version qt5
%global qt4c_version qt4
%if 0%{?suse_version} && 0%{?suse_version} >= 1315
%define qt_version %{qt5_version}
%define qt_version_obsolete %{qt4_version}
%define qt_config %{qt5_version}
%else
%define qt_version %{qt4_version}
%define qt_version_obsolete %{qt5_version}
%define qt_config %{qt4c_version}
%endif
# set binary names
%define daemon_name %{progbase}d
%define cli_name %{progbase}-cli
%define seeder_name %{progbase}-seeder
%define wallet_name %{progbase}-wallet
%define tx_name %{progbase}-tx
%define bench_name bench_%{progbase}
%define gui_name %{progbase}-qt
%define lib_name lib%{progbase}consensus%{soname}
%define test_name test_%{progbase}
%define test_gui_name test_%{gui_name}
%define test_seeder_name test_%{seeder_name}
# set package names
%define daemon_packname %{name}d
%define lib_packname %{lib_name}%{?libname_ext}
# set package conflict names
%define conflict_name01 %{nil}
%define conflict_soname01 0
# set runtime parameters
%define prog_confdirbase %{progbase}
%define prog_rundirbase %{progbase}
%define prog_statedirbase %{progbase}
%define prog_confdir %{_sysconfdir}/%{prog_confdirbase}
%define prog_rundir %{_rundir}/%{prog_rundirbase}
%define prog_statedir %{_localstatedir}/lib/%{prog_statedirbase}
%define prog_conffile %{prog_confdir}/%{progbase}.conf
%define prog_pidfile %{prog_rundir}/%{daemon_name}.pid
%define prog_user %{progbase}
%define prog_group %{progbase}
# set install parameters
%define pkg_docdir %{_defaultdocdir}/%{name}
%define pkg_licdir %{_defaultlicensedir}/%{name}
%define service_filename %{daemon_name}.service
%define pkg_rundirconffile %{_tmpfilesdir}/%{progbase}_rundir.conf
%if 0%{?suse_version} && 0%{?suse_version} >= 1500
%define pkg_bashcompdir %{_datadir}/bash-completion/completions
%else
%define pkg_bashcompdir %{_sysconfdir}/bash_completion.d
%define pkg_bashcompsuffix .bash-completion
%endif
%define pkg_fwconffile %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{daemon_name}
# set configuration options
%if %{with_bench}
%define conf_bench enable
%else
%define conf_bench disable
%endif
%if ! %{with_gui}
%define qt_config no
%endif
%if %{with_libs}
%define conf_libs with
%else
%define conf_libs without
%endif
%if %{with_man}
%define conf_man enable
%else
%define conf_man disable
%endif
%if %{with_seeder}
%define conf_seeder with
%else
%define conf_seeder without
%endif
%if %{with_tests}
%define conf_tests enable
%else
%define conf_tests disable
%endif
%if %{with_upnp}
%define conf_upnp with
%else
%define conf_upnp without
%endif
%if %{with_asm}
%define conf_asm enable
%else
%define conf_asm disable
%endif
%if %{with_sse2}
%define conf_sse2 enable
%else
%define conf_sse2 disable
%endif
%if %{with_sys_univalue}
%define conf_univalue with
%else
%define conf_univalue without
%endif
%if %{with_bip70}
%define conf_bip70 enable
%else
%define conf_bip70 disable
%endif
# set description
%define description_text BitCoin is a digital cryptographic currency that uses peer-to-peer technology to operate with no central authority or banks; managing transactions and the issuing of bitcoins is carried out collectively by the network.
# set summary and description for utils and test package
%if %{with_seeder}
%define pkg_utils_description This package provides %{display_name} CLI, %{display_name} Seeder, %{display_name} Wallet and %{display_name} TX, a command line interface for %{display_name}.
%else
%define pkg_utils_description This package provides %{display_name} CLI, %{display_name} Wallet and %{display_name} TX, a command line interface for %{display_name}.
%endif
%if %{with_tests} && %{with_bench}
%define pkg_test_summary Benchmarks and automated tests for %{progname} client
%define pkg_test_description This package provides benchmarks and automated tests for %{gui_name} and %{daemon_name}.
%endif
%if %{with_tests} && ( ! %{with_bench} )
%define pkg_test_summary Automated tests for %{progname} client
%define pkg_test_description This package provides automated tests for %{gui_name} and %{daemon_name}.
%endif
%if ( ! %{with_tests} ) && %{with_bench}
%define pkg_test_summary Benchmarks for %{progname} client
%define pkg_test_description This package provides benchmarks.
%endif
# conflict arrays
%define conflict_pack01 %{progname}%{?conflict_name01}
%define conflict_lib01 lib%{progname}consensus%{conflict_soname01}%{?conflict_name01:_}%{?conflict_name01}
%description
%{description_text}
%package utils
Summary: Utils for the %{display_name} crypto-currency
Group: Productivity/Networking/Other
%if %{with_package_conflict_support}
Conflicts: %{conflict_pack01}-utils
%if %{with_legacy_package_support}
Conflicts: %{conflict_pack01}-cli
%endif
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-utils <= %{ancient_version}
Provides: %{ancient_name}-utils = %{version}
%endif
%if %{with_legacy_package_support}
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-cli <= %{ancient_version}
Provides: %{ancient_name}-cli = %{version}
%endif
Obsoletes: %{name}-cli < %{version}
Provides: %{name}-cli = %{version}
%endif
%description utils
%{description_text}
%{pkg_utils_description}
%if %{with_gui}
%package %{qt_version}
Summary: GUI for the %{display_name} crypto-currency
Group: Productivity/Networking/Other
%if %{with_package_conflict_support}
Conflicts: %{conflict_pack01}-%{qt_version}
%if %{with_legacy_package_support}
Conflicts: %{conflict_pack01}-%{qt_version_obsolete}
%endif
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-%{qt_version} <= %{ancient_version}
Provides: %{ancient_name}-%{qt_version} = %{version}
%endif
%if %{with_legacy_package_support}
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-%{qt_version_obsolete} <= %{ancient_version}
Provides: %{ancient_name}-%{qt_version_obsolete} = %{version}
%endif
Obsoletes: %{name}-%{qt_version_obsolete} < %{version}
Provides: %{name}-%{qt_version_obsolete} = %{version}
%endif
%description %{qt_version}
%{description_text}
This package provides %{display_name} Qt, a GUI for %{display_name} based on Qt.
%endif
%package -n %{daemon_packname}
Summary: Headless daemon for %{progname} crypto-currency
Group: Productivity/Networking/Other
%if %{with_package_conflict_support}
Conflicts: %{conflict_pack01}d
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}d <= %{ancient_version}
Provides: %{ancient_name}d = %{version}
%endif
%{?systemd_requires}
%description -n %{daemon_packname}
%{description_text}
This package provides %{daemon_name}, a headless %{progname} daemon.
%if %{with_tests} || %{with_bench}
%package test
Summary: %{pkg_test_summary}
Group: Productivity/Networking/Other
%if %{with_package_conflict_support}
Conflicts: %{conflict_pack01}-test
%if %{with_legacy_package_support}
Conflicts: %{conflict_pack01}-bench
%endif
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-test <= %{ancient_version}
Provides: %{ancient_name}-test = %{version}
%endif
%if %{with_bench} && %{with_legacy_package_support}
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-bench <= %{ancient_version}
Provides: %{ancient_name}-bench = %{version}
%endif
Obsoletes: %{name}-bench < %{version}
Provides: %{name}-bench = %{version}
%endif
%description test
%{description_text}
%{pkg_test_description}
%endif
%if %{with_libs}
%package -n %{lib_packname}
Summary: Implementation of getblocktemplate protocol
Group: System/Libraries
%if %{with_package_conflict_support}
Conflicts: %{conflict_lib01}
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_libname} <= %{ancient_version}
Provides: %{ancient_libname} = %{version}
%endif
%description -n %{lib_packname}
%{description_text}
This package provides shared libraries for %{progname}.
%package -n %{lib_packname}-devel
Summary: Development files for %{lib_name}
Group: Development/Libraries/C and C++
%if %{with_package_conflict_support}
Conflicts: %{conflict_lib01}-devel
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_libname}-devel <= %{ancient_version}
Provides: %{ancient_libname}-devel = %{version}
%endif
Requires: %{lib_packname} = %{version}
%description -n %{lib_packname}-devel
%{description_text}
The %{lib_name}-devel package contains libraries and header files for developing applications that use %{lib_name}.
%endif
%package doc
Summary: Documentation for %{progname}
Group: Documentation/Man
BuildArch: noarch
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-doc <= %{ancient_version}
Provides: %{ancient_name}-doc = %{version}
%endif
%description doc
%{description_text}
This package contains the documentation for %{progname}.
%prep
%setup -q
%if 0%{?suse_version} && 0%{?is_opensuse} && 0%{?suse_version} > 1500
%patch0
%endif
%{_bindir}/dos2unix -k doc/README_windows.txt
# setup systemd service
%if "%{?service_src}"
%{__cp} -a %{service_src} contrib/init/%{service_filename}
%endif
%{__sed} -i 's#^\# \$ systemctl edit bitcoind.service$#\# $ systemctl edit %{service_filename}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# /etc/bitcoin/bitcoin.conf#\# %{prog_conffile}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^Description=Bitcoin daemon$#Description=%{display_name} Daemon#g' contrib/init/%{service_filename}
%{__sed} -i 's#^PIDFile=/run/bitcoind/bitcoind.pid$#PIDFile=%{prog_pidfile}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin$#ExecStartPre=/bin/chgrp %{prog_group} %{prog_confdir}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^ExecStart=/usr/bin/bitcoind -daemon \\$#ExecStart=%{_bindir}/%{daemon_name} -daemon\\#g' contrib/init/%{service_filename}
%{__sed} -i 's#-pid=/run/bitcoind/bitcoind.pid \\$#-pid=%{prog_pidfile} \\#g' contrib/init/%{service_filename}
%{__sed} -i 's#-conf=/etc/bitcoin/bitcoin.conf \\$#-conf=%{prog_conffile} \\#g' contrib/init/%{service_filename}
%{__sed} -i 's#-datadir=/var/lib/bitcoind$#-datadir=%{prog_statedir} \\\n -disablewallet\nExecReload=/bin/kill -HUP \$MAINPID#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# /run/bitcoind$#\# %{prog_rundir}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^RuntimeDirectory=bitcoind$#RuntimeDirectory=%{prog_rundirbase}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# /etc/bitcoin$#\# %{prog_confdir}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^ConfigurationDirectory=bitcoin$#ConfigurationDirectory=%{prog_confdirbase}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# /var/lib/bitcoind$#\# %{prog_statedir}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^StateDirectory=bitcoind$#StateDirectory=%{prog_statedirbase}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# Run as bitcoin:bitcoin$#\# Run as %{prog_user}:%{prog_group}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^User=bitcoin$#User=%{prog_user}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^Group=bitcoin$#Group=%{prog_group}#g' contrib/init/%{service_filename}
# setup default config file
%if "%{?conf_src}"
%{__mkdir_p} share/examples
%{__cp} -a %{conf_src} share/examples/%{progbase}.conf
%endif
%{__sed} -i 's#%{guiname_src}#%{gui_name}#g' share/examples/%{progbase}.conf
%{__sed} -i 's#%{progname_src}#%{progbase}#g' share/examples/%{progbase}.conf
%{__sed} -i 's#%{currencyname_src}#%{progbase}#g' share/examples/%{progbase}.conf
# setup firewall config
%if %{with_susefirewall_support}
echo "## Name: %{display_name} Daemon" > %{progbase}.firewall
echo "## Description: Opens ports for %{daemon_name} in order to allow remote connections." >> %{progbase}.firewall
echo -e "\nTCP=\"%{rpc_port}:%{p2p_port}\"" >> %{progbase}.firewall
%endif
# setup run folder
echo "d %{prog_rundir} 0710 root %{prog_group}" > rundir.conf
%build
%if %{with_compiler_upgrade}
%if 0%{?suse_version} && 0%{?is_opensuse} && 0%{?suse_version} == 1315
%if 0%{?sle_version} && 0%{?sle_version} == 120300
export CC=gcc-8 CXX=g++-8
%else
export CC=gcc-5 CXX=g++-5
%endif
%endif
%endif
./autogen.sh
%configure --docdir=%{pkg_docdir} --enable-silent-rules --enable-hardening --enable-reduce-exports --%{conf_asm}-asm --%{conf_sse2}-sse2 --%{conf_bip70}-bip70 --enable-zmq --enable-wallet --enable-upnp-default --enable-util-cli --enable-util-tx --enable-util-wallet --%{conf_bench}-bench --%{conf_tests}-tests --%{conf_man}-man --%{conf_upnp}-miniupnpc --with-qrencode --with-boost --with-utils --%{conf_seeder}-seeder --%{conf_libs}-libs --with-daemon --with-gui=%{qt_config} --with-qtdbus --%{conf_univalue}-system-univalue --disable-static CXXFLAGS="${CXXFLAGS} -DBUILD_SUFFIX=%{_host_vendor}"
%make_build
%if %{with_docs_html}
%make_build docs
%endif
%{__strip} -s src/%{cli_name}
%if %{with_seeder}
%{__strip} -s src/%{seeder_name}
%endif
%{__strip} -s src/%{wallet_name}
%{__strip} -s src/%{tx_name}
%if %{with_bench}
%{__strip} -s src/bench/%{bench_name}
%endif
%if %{with_gui}
%{__strip} -s src/qt/%{gui_name}
%endif
%{__strip} -s src/%{daemon_name}
%if %{with_tests}
%if %{with_gui}
%{__strip} -s src/qt/test/%{test_gui_name}
%endif
%if %{with_seeder}
%{__strip} -s src/seeder/test/%{test_seeder_name}
%endif
%{__strip} -s src/test/%{test_name}
%endif
%install
%make_install
# install daemon supplementary files
%{__install} -D -m 0644 -p share/examples/%{progbase}.conf %{buildroot}%{prog_conffile}
%{__install} -D -m 0644 -p contrib/init/%{service_filename} %{buildroot}%{_unitdir}/%{service_filename}
%if %{with_bash_support}
%{__install} -D -m 0644 -p contrib/%{daemon_name}.bash-completion %{buildroot}%{pkg_bashcompdir}/%{daemon_name}%{?pkg_bashcompsuffix}
%{__install} -D -m 0644 -p contrib/%{cli_name}.bash-completion %{buildroot}%{pkg_bashcompdir}/%{cli_name}%{?pkg_bashcompsuffix}
%{__install} -D -m 0644 -p contrib/%{tx_name}.bash-completion %{buildroot}%{pkg_bashcompdir}/%{tx_name}%{?pkg_bashcompsuffix}
%endif
%{__mkdir_p} %{buildroot}%{prog_statedir}
%{__install} -d -m 0755 %{buildroot}%{_sbindir}
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{daemon_name}
# install firewall config file
%if %{with_susefirewall_support}
%{__install} -D -m 644 -p %{progbase}.firewall %{buildroot}%{pkg_fwconffile}
%endif
# install desktop file
%if %{with_gui}
%{__install} -D -m 0644 -p %{icon_src} %{buildroot}%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file -c %{gui_name} "%{display_name}" "%{display_name} Wallet" %{gui_name} %{name} Office Finance
%endif
# install run folder configuration
%{__install} -D -m 0644 -p rundir.conf %{buildroot}/%{pkg_rundirconffile}
# install documentation
%{__install} -d -m 0755 %{buildroot}%{pkg_docdir}
%{__install} -m 0644 -p -t %{buildroot}%{pkg_docdir} %{doc_list}
%{__install} -d -m 0755 %{buildroot}%{pkg_licdir}
%{__install} -m 0644 -p -t %{buildroot}%{pkg_licdir} COPYING
%{__install} -d -m 0755 %{buildroot}%{pkg_docdir}/doc
%{__cp} -a -t %{buildroot}%{pkg_docdir}/doc doc/*.md doc/*.txt
%if %{with_docs_html}
%{__cp} -a -t %{buildroot}%{pkg_docdir}/doc doc/doxygen/html
%endif
%fdupes %{buildroot}%{pkg_docdir}
# eliminate files that do not go into the package
%if %{with_libs}
find %{buildroot} -name '*.la' -exec %{__rm} -f {} ';'
%endif
# no rpath check on arm architectures
%ifarch %arm
export NO_BRP_CHECK_RPATH=true
%endif
%if %{with_checks}
%check
%{__make} %{?_smp_mflags} check
%endif
%pre -n %{daemon_packname}
getent group %{prog_group} > /dev/null || groupadd -r %{prog_group}
getent passwd %{prog_user} > /dev/null || useradd -r -g %{prog_group} -d %{prog_statedir} -s /sbin/nologin -c "%{progbase} daemon" %{prog_user}
%service_add_pre %{service_filename}
%preun -n %{daemon_packname}
%service_del_preun %{service_filename}
%post -n %{daemon_packname}
%service_add_post %{service_filename}
%if 0%{?suse_version} && ( 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1315 && 0%{?sle_version} && 0%{?sle_version} >= 120100 ) )
%tmpfiles_create %{pkg_rundirconffile}
%else
systemd-tmpfiles --create %{pkg_rundirconffile} >/dev/null 2>&1 || :
%endif
%postun -n %{daemon_packname}
%service_del_postun %{service_filename}
%if %{with_gui}
%if 0%{?suse_version} && 0%{?suse_version} < 1500
%post %{qt_version}
%desktop_database_post
%postun %{qt_version}
%desktop_database_postun
%endif
%endif
%if %{with_libs}
%post -n %{lib_packname}
/sbin/ldconfig
%postun -n %{lib_packname}
/sbin/ldconfig
%endif
%files utils
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{cli_name}
%if %{with_seeder}
%attr(755,root,root) %{_bindir}/%{seeder_name}
%endif
%attr(755,root,root) %{_bindir}/%{tx_name}
%attr(755,root,root) %{_bindir}/%{wallet_name}
%if %{with_bash_support}
%{pkg_bashcompdir}/%{cli_name}%{?pkg_bashcompsuffix}
%{pkg_bashcompdir}/%{tx_name}%{?pkg_bashcompsuffix}
%endif
%if %{with_man}
%{_mandir}/man1/%{cli_name}.1%{?ext_man}
%{_mandir}/man1/%{tx_name}.1%{?ext_man}
%{_mandir}/man1/%{wallet_name}.1%{?ext_man}
%endif
%if %{with_gui}
%files %{qt_version}
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{gui_name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{gui_name}.desktop
%if %{with_man}
%{_mandir}/man1/%{gui_name}.1%{?ext_man}
%endif
%endif
%files -n %{daemon_packname}
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{daemon_name}
%{_sbindir}/rc%{daemon_name}
%{_unitdir}/%{service_filename}
%dir %attr(710,root,%{prog_group}) %{prog_confdir}
%config(noreplace) %attr(640,root,%{prog_group}) %{prog_conffile}
%if %{with_bash_support}
%{pkg_bashcompdir}/%{daemon_name}%{?pkg_bashcompsuffix}
%endif
%if %{with_susefirewall_support}
%config %{pkg_fwconffile}
%endif
%dir %attr(710,%{prog_user},%{prog_group}) %{prog_statedir}
%ghost %{prog_rundir}
%if 0%{?suse_version} && ( 0%{?suse_version} == 1320 || 0%{?suse_version} <= 1310 )
%dir %{_tmpfilesdir}
%endif
%{pkg_rundirconffile}
%if %{with_man}
%{_mandir}/man1/%{daemon_name}.1%{?ext_man}
%endif
%if %{with_tests} || %{with_bench}
%files test
%defattr(-,root,root,-)
%if %{with_bench}
%attr(755,root,root) %{_bindir}/%{bench_name}
%endif
%if %{with_tests}
%attr(755,root,root) %{_bindir}/%{test_name}
%if %{with_gui}
%attr(755,root,root) %{_bindir}/%{test_gui_name}
%endif
%if %{with_seeder}
%attr(755,root,root) %{_bindir}/%{test_seeder_name}
%endif
%endif
%endif
%if %{with_libs}
%files -n %{lib_packname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files -n %{lib_packname}-devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/pkgconfig/*
%{_libdir}/*.so
%endif
%files doc
%defattr(-,root,root,-)
%{pkg_docdir}/
%{pkg_licdir}/
%changelog