File bitcoingold.spec of Package bitcoingold
#
# spec file for package bitcoingold
#
# Copyright (c) 2024 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 bgold
%define specname_core bitcoingold
%define libname_core_ext %{nil}
# program base names
%define progbase %{progname}
%define libbase_consensus lib%{progbase}consensus
%define libbase_kernel lib%{progbase}kernel
# settings
%define specname %{specname_core}
%define specurl https://btgofficial.org/
%define speclicense MIT
%define currency_name BitCoin Gold
%define display_name BitCoin Gold
%define libname_ext %{?libname_core_ext}
%define conf_src share/examples/bitcoingold.conf
%define icon_src share/pixmaps/bitcoin256.png
%define service_src contrib/init/bitcoind.service
%define doc_list CONTRIBUTING.md README.md SECURITY.md
%define vendor_ident %{_host_vendor}
%define lic_file COPYING
%define lic_list %{lic_file}
# conf replacements
%define currencyname_src Bitcoin
%define guiname_src Bitcoin-Qt
%define progname_src bitcoin
# port settings
%define p2p_port 8338
%define rpc_port 18338
# ancient program
%define ancient_name %{nil}
%define ancient_libname_consensus %{nil}
%define ancient_libname_kernel %{nil}
%define ancient_version %{nil}
# settings for dependencies
%define automake_version 1.0
%define libboost_version 1.47.0
%define libdb_version 4_8
%define libevent_version 2.0.22
%define libgcc_version 4.8
%define libminiupnpc_version 1.0
%undefine libopenssl_version
%define libqt5_version 5.0.0
%define libqt6_version 6.0.0
%define libsqlite_version 1.0.0
%define libunivalue_version 1.0.0
%define libzeromq_version 1.0.0
%define python_version 3.4
# boost version to use
%undefine boost_flavor_version
# gcc version to use for compiler upgrade
%define compiler_upgrade_version 11
# python version to use for testing
%define python_flavor_version 3
# qt version to use for gui
%define qt_flavor_version 5
# experimental features
%define without_experimental_features 0
# options
%define with_bench 0
%define with_gui 0
%define with_libs_consensus 0
%define with_man 1
%define with_util_chainstate 0
%define with_util_cli 1
%define with_util_miner 0
%define with_util_seeder 0
%define with_util_util 0
%define with_util_tx 0
%define with_util_wallet 0
%define with_tests 0
%define with_checks 0
%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} > 1500 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1500 && 0%{?sle_version} && 0%{?sle_version} >= 150200 ) )
%define with_multiprocessing 1
%else
%define with_multiprocessing 0
%endif
%if %{with_multiprocessing}
%define with_mpcodegen 1
%else
%define with_mpcodegen 0
%endif
%define with_natpmp 0
%define with_external_signer 0
%define with_libs_kernel 0
%if 0%{?suse_version} && 0%{?suse_version} == 1320 && "%{_arch}" == "ppc64le"
%define with_asm 0
%else
%define with_asm 1
%endif
%define with_sqlite 1
%define with_sse2 0
%define with_sandbox 0
%define with_bash_support 0
%define with_fish_support 0
%define with_postfix_support 0
%define with_bip70 0
%define with_docs 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
%ifarch %arm
%define without_rpath_check 1
%else
%define without_rpath_check 0
%endif
%define with_sys_univalue 1
# options for build type standard
%if "%{?__btype}" == ""
%define without_experimental_features 1
%endif
# options for build type experimental
%if "%{?__btype}" == "experimental"
%define with_docs 0
%endif
# options for build type nightly
%if "%{?__btype}" == "nightly"
%define with_bash_support 0
%define with_docs 0
%define with_man 0
%endif
# disable experimental features
%if %{without_experimental_features}
%define with_libs_kernel 0
%define with_multiprocessing 0
%define with_util_chainstate 0
%endif
Name: %{specname}
Version: 0.21.3b
Release: 0
Summary: P2P digital currency
License: %{speclicense}
Group: Productivity/Networking/Other
URL: %{specurl}
Source0: %{name}-%{version}.tar.xz
BuildRequires: automake >= %{automake_version}
%if %{with_bash_support}
BuildRequires: bash-completion
%endif
%if %{with_util_chainstate}
BuildRequires: chrpath
%endif
BuildRequires: dos2unix
%if %{with_docs} && %{with_docs_html}
BuildRequires: doxygen
BuildRequires: graphviz
%endif
%if %{with_fish_support}
BuildRequires: fish
%endif
BuildRequires: fdupes
%if %{with_compiler_upgrade}
BuildRequires: gcc%{compiler_upgrade_version} >= %{libgcc_version}
BuildRequires: gcc%{compiler_upgrade_version}-c++ >= %{libgcc_version}
%endif
BuildRequires: libboost_filesystem%{?boost_flavor_version}-devel >= %{libboost_version}
BuildRequires: libboost_program_options%{?boost_flavor_version}-devel >= %{libboost_version}
BuildRequires: libboost_system%{?boost_flavor_version}-devel >= %{libboost_version}
%if %{with_tests}
BuildRequires: libboost_test%{?boost_flavor_version}-devel >= %{libboost_version}
%endif
BuildRequires: libboost_thread%{?boost_flavor_version}-devel >= %{libboost_version}
BuildRequires: libdb-%{libdb_version}-devel
BuildRequires: pkgconfig(libevent) >= %{libevent_version}
BuildRequires: pkgconfig(libopenssl%{?libopenssl_version:-}%{?libopenssl_version})
BuildRequires: pkgconfig(libqrencode)
%if %{with_sandbox}
BuildRequires: pkgconfig(libseccomp)
%endif
%if %{with_sys_univalue}
BuildRequires: pkgconfig(libunivalue) >= %{libunivalue_version}
%endif
BuildRequires: pkgconfig(libzmq) >= %{libzeromq_version}
BuildRequires: pkgconfig(protobuf)
%if %{with_sqlite}
BuildRequires: pkgconfig(sqlite3) >= %{libsqlite_version}
%endif
BuildRequires: pkgconfig(libb2)
%if %{with_upnp}
BuildRequires: libminiupnpc-devel >= %{libminiupnpc_version}
%endif
%if %{with_multiprocessing}
BuildRequires: capnproto
BuildRequires: libcapnp-devel
BuildRequires: libmultiprocess-devel-static
%endif
%if %{with_natpmp}
BuildRequires: libnatpmp-devel
%endif
BuildRequires: libtool
%if %{with_gui}
%if %{qt_flavor_version} == 6
BuildRequires: qt6-base-devel >= %{libqt6_version}
BuildRequires: qt6-tools-devel >= %{libqt6_version}
%endif
%if %{qt_flavor_version} == 5
BuildRequires: libqt5-qtbase-devel >= %{libqt5_version}
BuildRequires: libqt5-qttools-devel >= %{libqt5_version}
%endif
%if %{qt_flavor_version} == 4
BuildRequires: libqt4-devel
%endif
%endif
%if %{with_checks}
BuildRequires: python%{python_flavor_version} >= %{python_version}
%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} >= 120100 ) )
BuildRequires: shadow
%endif
%if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run
%endif
%define soname_consensus 0
%define soname_kernel 0
%global qt4_version qt
%global qt5_version qt5
%global qt6_version qt6
%if %{qt_flavor_version} == 6
%define qt_version %{qt6_version}
%define qt_version_obsolete %{qt5_version}
%define qt_config %{qt6_version}
%else
%if %{qt_flavor_version} == 5
%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 %{nil}
%define qt_config %{qt4_version}
%endif
%endif
# set binary names
%define bench_name bench_%{progbase}
%define chainstate_name %{progbase}-chainstate
%define cli_name %{progbase}-cli
%define gui_name %{progbase}-qt
%define guim_name %{progbase}-gui
%define node_name %{progbase}d-node
%define seeder_name %{progbase}-seeder
%define tx_name %{progbase}-tx
%define util_name %{progbase}-util
%define wallet_name %{progbase}-wallet
%define daemon_name %{progbase}d
%define lib_name_consensus %{libbase_consensus}%{soname_consensus}
%define lib_name_kernel %{libbase_kernel}%{soname_kernel}
%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_consensus %{lib_name_consensus}%{?libname_ext}
%define lib_packname_kernel %{lib_name_kernel}%{?libname_ext}
%define bash_completion_packname_suffix bash-completion
%define fish_completion_packname_suffix fish-completion
# set package conflict names
%define conflict_name01 %{nil}
%define conflict_consensus_soname01 %{nil}
%define conflict_kernel_soname01 %{nil}
# 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 desktop_filename %{gui_name}.desktop
%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
%undefine pkg_bashcompsuffix
%else
%define pkg_bashcompdir %{_sysconfdir}/bash_completion.d
%define pkg_bashcompsuffix .bash-completion
%endif
%define pkg_fishcompdir %{_datadir}/fish/vendor_completions.d
%define pkg_fishcompsuffix .fish
%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_consensus}
%define conf_consensus_lib with
%else
%define conf_consensus_lib without
%endif
%if %{with_man}
%define conf_man enable
%else
%define conf_man disable
%endif
%if %{with_util_chainstate}
%define conf_util_chainstate enable
%else
%define conf_util_chainstate disable
%endif
%if %{with_util_cli}
%define conf_util_cli enable
%else
%define conf_util_cli disable
%endif
%if %{with_util_miner}
%define conf_util_miner enable
%else
%define conf_util_miner disable
%endif
%if %{with_util_seeder}
%define conf_util_seeder enable
%else
%define conf_util_seeder disable
%endif
%if %{with_util_util}
%define conf_util_util enable
%else
%define conf_util_util disable
%endif
%if %{with_util_tx}
%define conf_util_tx enable
%else
%define conf_util_tx disable
%endif
%if %{with_util_wallet}
%define conf_util_wallet enable
%else
%define conf_util_wallet disable
%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_multiprocessing}
%define conf_multiprocessing enable
%define conf_libmultiprocessing yes
%else
%define conf_multiprocessing disable
%define conf_libmultiprocessing no
%endif
%if %{with_mpcodegen}
%define conf_mpcodegen yes
%else
%define conf_mpcodegen no
%endif
%if %{with_natpmp}
%define conf_natpmp with
%else
%define conf_natpmp without
%endif
%if %{with_external_signer}
%define conf_external_signer enable
%else
%define conf_external_signer disable
%endif
%if %{with_sandbox}
%define conf_sandbox with
%else
%define conf_sandbox without
%endif
%if %{with_libs_kernel}
%define conf_kernel_lib with
%else
%define conf_kernel_lib without
%endif
%if %{with_asm}
%define conf_asm enable
%else
%define conf_asm disable
%endif
%if %{with_sqlite}
%define conf_sqlite yes
%else
%define conf_sqlite no
%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_01 BTG Core (aka Bitcoin Gold Core, BTCGPU) is the original BTG client and it builds the backbone of the network. It is based on Bitcoin Core. BTG began as a fork of Bitcoin after block height 491406 on Tue, 24 Oct 2017 01:17:35 GMT and began being mined as a separate chain at block height 491407 on Sun, 12 Nov 2017 13:34:01 GMT.
%define description_text_02 This project began out of the desire to create a variant of Bitcoin that is more decentralized by using an ASIC-resistant Proof of Work algorithm, removing barriers to entry for new miners around the world and reducing the concentration of power in the hands of massive-scale mining operations.
%define description_text_03 BTG preserves and implements Bitcoin features such as SegWit, which enables advanced scaling technologies like Lightning Network. Significant differences at launch time included:
%define description_text_04 - ASIC-resistant GPU-minable PoW algorithm (Equihash)
%define description_text_05 - Per-block difficulty adjustment algorithm
%define description_text_06 - Replay protection (SIGHASH_FORK_ID)
%define description_text_07 - Unique wallet addresses (prefixes of G and A, to avoid user confusion with Bitcoin)
%define description_text_08 Although BTG was bootstrapped on 12 Nov to create an entirely new network, it contains the entire Bitcoin blockchain until block 491406. This means BTG was a full fork at that time, with all Bitcoin transaction history since 2009. Any Bitcoin wallet address which held Bitcoin in BTC block 491406 before the fork held an equal number of Bitcoin Gold in BTG block 491407 after the fork, and those funds are accessible through the original private keys.
# set summary and description for utils and test package
%if %{with_util_cli}
%define pkg_utils_description_cli %{display_name} CLI,
%else
%define pkg_utils_description_cli %{nil}
%endif
%if %{with_util_miner}
%define pkg_utils_description_miner %{display_name} Miner,
%else
%define pkg_utils_description_miner %{nil}
%endif
%if %{with_util_seeder}
%define pkg_utils_description_seeder %{display_name} Seeder,
%else
%define pkg_utils_description_seeder %{nil}
%endif
%if %{with_util_util}
%define pkg_utils_description_util %{display_name} Util,
%else
%define pkg_utils_description_util %{nil}
%endif
%if %{with_util_tx}
%define pkg_utils_description_tx %{display_name} TX,
%else
%define pkg_utils_description_tx %{nil}
%endif
%if %{with_util_wallet}
%define pkg_utils_description_wallet %{display_name} Wallet,
%else
%define pkg_utils_description_wallet %{nil}
%endif
%define pkg_utils_description This package provides %{?pkg_utils_description_cli}%{?pkg_utils_description_miner}%{?pkg_utils_description_seeder}%{?pkg_utils_description_util}%{?pkg_utils_description_tx}%{?pkg_utils_description_wallet} command line interfaces for %{display_name}.
%define pkg_multi_description This package provides the multiprocessing interfaces for %{display_name}.
%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_consensus_lib01 %{libbase_consensus}%{conflict_consensus_soname01}%{?conflict_name01:_}%{?conflict_name01}
%define conflict_kernel_lib01 %{libbase_kernel}%{conflict_kernel_soname01}%{?conflict_name01:_}%{?conflict_name01}
%description
%{description_text_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
%if %{with_util_cli} || %{with_util_miner} || %{with_util_seeder} || %{with_util_util} || %{with_util_tx} || %{with_util_wallet}
%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_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
%{pkg_utils_description}
%if %{with_bash_support}
%package utils-%{bash_completion_packname_suffix}
Summary: Bash Completion for %{name}-utils
Group: System/Shells
Requires: %{name}-utils = %{version}
Requires: bash-completion
Supplements: (%{name}-utils and bash-completion)
BuildArch: noarch
%description utils-%{bash_completion_packname_suffix}
Bash command line completion support for %{name}-utils.
%endif
%if %{with_fish_support}
%package utils-%{fish_completion_packname_suffix}
Summary: Fish completion for %{name}-utils
Group: System/Shells
Requires: %{name}-utils = %{version}
Requires: fish
Supplements: (%{name}-utils and fish)
BuildArch: noarch
%description utils-%{fish_completion_packname_suffix}
Fish command line completion support for %{name}-utils.
%endif
%endif
%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_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
This package provides %{display_name} Qt, a GUI for %{display_name} based on Qt.
%if %{with_fish_support}
%package %{qt_version}-%{fish_completion_packname_suffix}
Summary: Fish completion for %{name}-%{qt_version}
Group: System/Shells
Requires: %{name}-%{qt_version} = %{version}
Requires: fish
Supplements: (%{name}-%{qt_version} and fish)
BuildArch: noarch
%description %{qt_version}-%{fish_completion_packname_suffix}
Fish command line completion support for %{name}-%{qt_version}.
%endif
%endif
%package -n %{daemon_packname}
Summary: Headless daemon for %{progname} crypto-currency
Group: Productivity/Networking/Other
%if %{with_postfix_support}
Recommends: postfix
%endif
%if %{with_package_conflict_support}
Conflicts: %{conflict_pack01}d
%endif
%if %{with_docs}
Suggests: %{name}-doc = %{version}
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}d <= %{ancient_version}
Provides: %{ancient_name}d = %{version}
%endif
%if ! %{defined systemd_ordering}
%{?systemd_requires}
%else
%{?systemd_ordering}
%endif
%description -n %{daemon_packname}
%{description_text_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
This package provides %{daemon_name}, a headless %{progname} daemon.
%if %{with_bash_support}
%package -n %{daemon_packname}-%{bash_completion_packname_suffix}
Summary: Bash Completion for %{daemon_packname}
Group: System/Shells
Requires: %{daemon_packname} = %{version}
Requires: bash-completion
Supplements: (%{daemon_packname} and bash-completion)
BuildArch: noarch
%description -n %{daemon_packname}-%{bash_completion_packname_suffix}
Bash command line completion support for %{daemon_packname}.
%endif
%if %{with_fish_support}
%package -n %{daemon_packname}-%{fish_completion_packname_suffix}
Summary: Fish completion for %{daemon_packname}
Group: System/Shells
Requires: %{daemon_packname} = %{version}
Requires: fish
Supplements: (%{daemon_packname} and fish)
BuildArch: noarch
%description -n %{daemon_packname}-%{fish_completion_packname_suffix}
Fish command line completion support for %{daemon_packname}.
%endif
%if %{with_multiprocessing}
%package multi
Summary: Multiprocessing for the %{display_name} crypto-currency
Group: Productivity/Networking/Other
%if %{with_package_conflict_support}
Conflicts: %{conflict_pack01}-multi
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_name}-multi <= %{ancient_version}
Provides: %{ancient_name}-multi = %{version}
%endif
%description multi
%{description_text_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
%{pkg_multi_description}
%endif
%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_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
%{pkg_test_description}
%endif
%if %{with_libs_consensus}
%package -n %{lib_packname_consensus}
Summary: Implementation of getblocktemplate protocol
Group: System/Libraries
%if %{with_package_conflict_support}
Conflicts: %{conflict_consensus_lib01}
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_libname_consensus} <= %{ancient_version}
Provides: %{ancient_libname_consensus} = %{version}
%endif
%description -n %{lib_packname_consensus}
%{description_text_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
This package provides shared consensus libraries for %{progname}.
%package -n %{lib_packname_consensus}-devel
Summary: Development files for %{lib_name_consensus}
Group: Development/Libraries/C and C++
%if %{with_package_conflict_support}
Conflicts: %{conflict_consensus_lib01}-devel
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_libname_consensus}-devel <= %{ancient_version}
Provides: %{ancient_libname_consensus}-devel = %{version}
%endif
Requires: %{lib_packname_consensus} = %{version}
%description -n %{lib_packname_consensus}-devel
%{description_text_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
The %{lib_name_consensus}-devel package contains libraries and header files for developing applications that use %{lib_name_consensus}.
%endif
%if %{with_libs_kernel}
%package -n %{lib_packname_kernel}
Summary: Implementation of a consensus engine
Group: System/Libraries
%if %{with_package_conflict_support}
Conflicts: %{conflict_kernel_lib01}
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_libname_kernel} <= %{ancient_version}
Provides: %{ancient_libname_kernel} = %{version}
%endif
%description -n %{lib_packname_kernel}
%{description_text_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
This package provides shared kernel libraries for %{progname}.
%package -n %{lib_packname_kernel}-devel
Summary: Development files for %{lib_name_kernel}
Group: Development/Libraries/C and C++
%if %{with_package_conflict_support}
Conflicts: %{conflict_kernel_lib01}-devel
%endif
%if %{with_ancient_program_support}
Obsoletes: %{ancient_libname_kernel}-devel <= %{ancient_version}
Provides: %{ancient_libname_kernel}-devel = %{version}
%endif
Requires: %{lib_packname_kernel} = %{version}
%description -n %{lib_packname_kernel}-devel
%{description_text_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
The %{lib_name_kernel}-devel package contains libraries and header files for developing applications that use %{lib_name_kernel}.
%endif
%if %{with_docs}
%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_01}
%{description_text_02}
%{description_text_03}
%{description_text_04}
%{description_text_05}
%{description_text_06}
%{description_text_07}
%{description_text_08}
This package contains the documentation for %{progname}.
%endif
%prep
%setup -q
%{_bindir}/dos2unix -k doc/README_windows.txt
# setup distribution identifier
%if "%{?vendor_ident}"
%{__sed} -i 's/^ #define BUILD_SUFFIX "-unk"$/ #define BUILD_SUFFIX "-%{vendor_ident}"/g' src/clientversion.cpp
%endif
# 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/bitcoingold/bitcoingold.conf#\# %{prog_conffile}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^Description=Bitcoin Gold daemon$#Description=%{display_name} Daemon#g' contrib/init/%{service_filename}
%{__sed} -i 's#^PIDFile=/run/bgoldd/bgoldd.pid$#PIDFile=%{prog_pidfile}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^ExecStart=/usr/bin/bitcoind -daemon \\$#ExecStart=%{_bindir}/%{daemon_name} -daemonwait \\#g' contrib/init/%{service_filename}
%{__sed} -i 's#-pid=/run/bgoldd/bgoldd.pid \\$#-pid=%{prog_pidfile} \\#g' contrib/init/%{service_filename}
%{__sed} -i 's#-conf=/etc/bitcoingold/bitcoingold.conf \\$#-conf=%{prog_conffile} \\#g' contrib/init/%{service_filename}
%{__sed} -i 's#-datadir=/var/lib/bgoldd$#-datadir=%{prog_statedir} \\\n -disablewallet#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# /run/bgoldd$#\# %{prog_rundir}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^RuntimeDirectory=bgoldd$#RuntimeDirectory=%{prog_rundirbase}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# /etc/bitcoingold$#\# %{prog_confdir}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^ConfigurationDirectory=bitcoingold$#ConfigurationDirectory=%{prog_confdirbase}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^\# /var/lib/bgoldd$#\# %{prog_statedir}#g' contrib/init/%{service_filename}
%{__sed} -i 's#^StateDirectory=bgoldd$#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 desktop file
%if %{with_gui}
echo "[Desktop Entry]" > contrib/%{desktop_filename}
echo "Categories=Office;Finance;" >> contrib/%{desktop_filename}
echo "Encoding=UTF-8" >> contrib/%{desktop_filename}
echo "Name=%{display_name}" >> contrib/%{desktop_filename}
echo "GenericName=%{display_name} Wallet" >> contrib/%{desktop_filename}
echo "Type=Application" >> contrib/%{desktop_filename}
echo "Exec=%{gui_name}" >> contrib/%{desktop_filename}
echo "Icon=%{name}" >> contrib/%{desktop_filename}
%endif
# 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}
export CC=gcc-%{compiler_upgrade_version} CXX=g++-%{compiler_upgrade_version}
%endif
./autogen.sh
%configure --docdir=%{pkg_docdir} --enable-silent-rules --enable-hardening --enable-reduce-exports --disable-usdt --enable-year2038 --%{conf_asm}-asm --%{conf_sse2}-sse2 --%{conf_multiprocessing}-multiprocess --%{conf_bip70}-bip70 --enable-zmq --enable-wallet --enable-upnp-default --disable-natpmp-default --%{conf_util_chainstate}-experimental-util-chainstate --%{conf_util_cli}-util-cli --%{conf_util_miner}-util-miner --%{conf_util_seeder}-util-seeder --%{conf_util_util}-util-util --%{conf_util_tx}-util-tx --%{conf_util_wallet}-util-wallet --%{conf_bench}-bench --%{conf_tests}-tests --%{conf_man}-man --%{conf_upnp}-miniupnpc --%{conf_natpmp}-natpmp --%{conf_external_signer}-external-signer --%{conf_sandbox}-seccomp --with-qrencode --with-boost --%{conf_consensus_lib}-libs --%{conf_kernel_lib}-experimental-kernel-lib --with-daemon --with-gui=%{qt_config} --with-sqlite=%{conf_sqlite} --with-libmultiprocess=%{conf_libmultiprocessing} --with-mpgen=%{conf_mpcodegen} --with-qtdbus --%{conf_univalue}-system-univalue --disable-static
%make_build
%if %{with_docs} && %{with_docs_html}
%make_build docs
%endif
%if %{with_util_cli}
%{__strip} -s src/%{cli_name}
%endif
%if %{with_util_miner}
%{__strip} -s src/%{miner_name}
%endif
%if %{with_libs_consensus}
%{__strip} -s src/.libs/%{libbase_consensus}.so.0.0.0
%endif
%if %{with_libs_kernel}
%{__strip} -s src/.libs/%{libbase_kernel}.so.0.0.0
%endif
%if %{with_multiprocessing}
%if %{with_gui}
%{__strip} -s src/%{guim_name}
%endif
%{__strip} -s src/%{node_name}
%endif
%if %{with_util_seeder}
%{__strip} -s src/%{seeder_name}
%endif
%if %{with_util_util}
%{__strip} -s src/%{util_name}
%endif
%if %{with_util_tx}
%{__strip} -s src/%{tx_name}
%endif
%if %{with_util_wallet}
%{__strip} -s src/%{wallet_name}
%endif
%if %{with_util_chainstate}
%{_bindir}/chrpath -d src/%{chainstate_name}
%{__strip} -s src/%{chainstate_name}
%endif
%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_util_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/completions/bash/%{daemon_name}.bash %{buildroot}%{pkg_bashcompdir}/%{daemon_name}%{?pkg_bashcompsuffix}
%if %{with_util_cli}
%{__install} -D -m 0644 -p contrib/completions/bash/%{cli_name}.bash %{buildroot}%{pkg_bashcompdir}/%{cli_name}%{?pkg_bashcompsuffix}
%endif
%if %{with_util_tx}
%{__install} -D -m 0644 -p contrib/completions/bash/%{tx_name}.bash %{buildroot}%{pkg_bashcompdir}/%{tx_name}%{?pkg_bashcompsuffix}
%endif
%endif
%if %{with_fish_support}
%{__install} -D -m 0644 -p contrib/completions/fish/%{daemon_name}.fish %{buildroot}%{pkg_fishcompdir}/%{daemon_name}%{?pkg_fishcompsuffix}
%if %{with_util_cli}
%{__install} -D -m 0644 -p contrib/completions/fish/%{cli_name}.fish %{buildroot}%{pkg_fishcompdir}/%{cli_name}%{?pkg_fishcompsuffix}
%endif
%if %{with_util_tx}
%{__install} -D -m 0644 -p contrib/completions/fish/%{tx_name}.fish %{buildroot}%{pkg_fishcompdir}/%{tx_name}%{?pkg_fishcompsuffix}
%endif
%if %{with_gui}
%{__install} -D -m 0644 -p contrib/completions/fish/%{gui_name}.fish %{buildroot}%{pkg_fishcompdir}/%{gui_name}%{?pkg_fishcompsuffix}
%endif
%if %{with_util_wallet}
%{__install} -D -m 0644 -p contrib/completions/fish/%{wallet_name}.fish %{buildroot}%{pkg_fishcompdir}/%{wallet_name}%{?pkg_fishcompsuffix}
%endif
%if %{with_util_util}
%{__install} -D -m 0644 -p contrib/completions/fish/%{util_name}.fish %{buildroot}%{pkg_fishcompdir}/%{util_name}%{?pkg_fishcompsuffix}
%endif
%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
%{__install} -D -m 0644 -p contrib/%{desktop_filename} %{buildroot}%{_datadir}/applications/%{desktop_filename}
%endif
# install run folder configuration
%{__install} -D -m 0644 -p rundir.conf %{buildroot}/%{pkg_rundirconffile}
# install documentation
%if %{with_docs}
%{__install} -d -m 0755 %{buildroot}%{pkg_docdir}
%{__install} -m 0644 -p -t %{buildroot}%{pkg_docdir} %{doc_list}
%{__install} -d -m 0755 %{buildroot}%{pkg_docdir}/doc/design
%{__install} -d -m 0755 %{buildroot}%{pkg_docdir}/doc/policy
%{__cp} -a -t %{buildroot}%{pkg_docdir}/doc doc/*.md doc/*.txt
%{__cp} -a -t %{buildroot}%{pkg_docdir}/doc/design doc/design/*.md
%{__cp} -a -t %{buildroot}%{pkg_docdir}/doc/policy doc/policy/*.md
%if %{with_docs} && %{with_docs_html}
%{__cp} -a -t %{buildroot}%{pkg_docdir}/doc doc/doxygen/html
%endif
%{__install} -d -m 0755 %{buildroot}%{pkg_licdir}
%{__install} -m 0644 -p -t %{buildroot}%{pkg_licdir} %{lic_list}
%fdupes %{buildroot}%{pkg_docdir}
%endif
# eliminate files that do not go into the package
%if %{with_libs_consensus} || %{with_libs_kernel}
find %{buildroot} -name '*.la' -exec %{__rm} -f {} ';'
%endif
%if ! %{with_util_tx}
%{__rm} %{buildroot}%{_bindir}/bitcoin-tx
%endif
# no rpath check
%if %{without_rpath_check}
export NO_BRP_CHECK_RPATH=true
%endif
%if %{with_checks}
%check
%make_build check
%endif
%pre -n %{daemon_packname}
%{_bindir}/getent group %{prog_group} > /dev/null || %{_sbindir}/groupadd -r %{prog_group}
%{_bindir}/getent passwd %{prog_user} > /dev/null || %{_sbindir}/useradd -r -g %{prog_group} -d %{prog_statedir} -s /sbin/nologin -c "%{progbase} daemon" %{prog_user}
%if %{with_postfix_support}
%{_bindir}/getent group maildrop > /dev/null && %{_sbindir}/usermod -G maildrop %{prog_user}
%endif
%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_consensus}
%post -n %{lib_packname_consensus}
/sbin/ldconfig
%postun -n %{lib_packname_consensus}
/sbin/ldconfig
%endif
%if %{with_libs_kernel}
%post -n %{lib_packname_kernel}
/sbin/ldconfig
%postun -n %{lib_packname_kernel}
/sbin/ldconfig
%endif
%if %{with_util_chainstate} || %{with_util_cli} || %{with_util_miner} || %{with_util_seeder} || %{with_util_util} || %{with_util_tx} || %{with_util_wallet}
%files utils
%defattr(-,root,root,-)
%if %{with_util_chainstate}
%attr(755,root,root) %{_bindir}/%{chainstate_name}
%endif
%if %{with_util_cli}
%attr(755,root,root) %{_bindir}/%{cli_name}
%endif
%if %{with_util_miner}
%attr(755,root,root) %{_bindir}/%{miner_name}
%endif
%if %{with_util_seeder}
%attr(755,root,root) %{_bindir}/%{seeder_name}
%endif
%if %{with_util_util}
%attr(755,root,root) %{_bindir}/%{util_name}
%endif
%if %{with_util_tx}
%attr(755,root,root) %{_bindir}/%{tx_name}
%endif
%if %{with_util_wallet}
%attr(755,root,root) %{_bindir}/%{wallet_name}
%endif
%if %{with_man}
%if %{with_util_cli}
%{_mandir}/man1/%{cli_name}.1%{?ext_man}
%endif
%if %{with_util_util}
%{_mandir}/man1/%{util_name}.1%{?ext_man}
%endif
%if %{with_util_tx}
%{_mandir}/man1/%{tx_name}.1%{?ext_man}
%endif
%if %{with_util_wallet}
%{_mandir}/man1/%{wallet_name}.1%{?ext_man}
%endif
%endif
%license %{lic_file}
%if %{with_bash_support}
%files utils-%{bash_completion_packname_suffix}
%defattr(-,root,root,-)
%if %{with_util_cli}
%{pkg_bashcompdir}/%{cli_name}%{?pkg_bashcompsuffix}
%endif
%if %{with_util_tx}
%{pkg_bashcompdir}/%{tx_name}%{?pkg_bashcompsuffix}
%endif
%license %{lic_file}
%endif
%if %{with_fish_support}
%files utils-%{fish_completion_packname_suffix}
%defattr(-,root,root,-)
%if %{with_util_cli}
%{pkg_fishcompdir}/%{cli_name}%{?pkg_fishcompsuffix}
%endif
%if %{with_util_util}
%{pkg_fishcompdir}/%{util_name}%{?pkg_fishcompsuffix}
%endif
%if %{with_util_tx}
%{pkg_fishcompdir}/%{tx_name}%{?pkg_fishcompsuffix}
%endif
%if %{with_util_wallet}
%{pkg_fishcompdir}/%{wallet_name}%{?pkg_fishcompsuffix}
%endif
%license %{lic_file}
%endif
%endif
%if %{with_gui}
%files %{qt_version}
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{gui_name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{desktop_filename}
%if %{with_man}
%{_mandir}/man1/%{gui_name}.1%{?ext_man}
%endif
%license %{lic_file}
%if %{with_fish_support}
%files %{qt_version}-%{fish_completion_packname_suffix}
%defattr(-,root,root,-)
%{pkg_fishcompdir}/%{gui_name}%{?pkg_fishcompsuffix}
%license %{lic_file}
%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_susefirewall_support}
%config %{pkg_fwconffile}
%endif
%dir %attr(710,%{prog_user},%{prog_group}) %{prog_statedir}
%ghost %attr(710,%{prog_user},%{prog_group}) %{prog_rundir}
%if 0%{?suse_version} && ( 0%{?suse_version} == 1320 || 0%{?suse_version} <= 1310 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1315 && 0%{?sle_version} && 0%{?sle_version} == 120100 ) )
%dir %{_tmpfilesdir}
%endif
%{pkg_rundirconffile}
%if %{with_man}
%{_mandir}/man1/%{daemon_name}.1%{?ext_man}
%endif
%license %{lic_file}
%if %{with_bash_support}
%files -n %{daemon_packname}-%{bash_completion_packname_suffix}
%defattr(-,root,root,-)
%{pkg_bashcompdir}/%{daemon_name}%{?pkg_bashcompsuffix}
%license %{lic_file}
%endif
%if %{with_fish_support}
%files -n %{daemon_packname}-%{fish_completion_packname_suffix}
%defattr(-,root,root,-)
%{pkg_fishcompdir}/%{daemon_name}%{?pkg_fishcompsuffix}
%license %{lic_file}
%endif
%if %{with_multiprocessing}
%files multi
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{node_name}
%if %{with_gui}
%attr(755,root,root) %{_bindir}/%{guim_name}
%endif
%license %{lic_file}
%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_util_seeder}
%attr(755,root,root) %{_bindir}/%{test_seeder_name}
%endif
%endif
%license %{lic_file}
%endif
%if %{with_libs_consensus}
%files -n %{lib_packname_consensus}
%defattr(-,root,root,-)
%{_libdir}/%{libbase_consensus}.so.*
%license %{lic_file}
%files -n %{lib_packname_consensus}-devel
%defattr(-,root,root,-)
%if 0%{?suse_version} && 0%{?suse_version} > 1500
%dir %{_includedir}
%endif
%{_includedir}/%{libbase_consensus}.h
%{_libdir}/pkgconfig/%{libbase_consensus}.pc
%{_libdir}/%{libbase_consensus}.so
%license %{lic_file}
%endif
%if %{with_libs_kernel}
%files -n %{lib_packname_kernel}
%defattr(-,root,root,-)
%{_libdir}/%{libbase_kernel}.so.*
%license %{lic_file}
%files -n %{lib_packname_kernel}-devel
%defattr(-,root,root,-)
%if 0%{?suse_version} && 0%{?suse_version} > 1500
%dir %{_includedir}
%endif
%{_includedir}/%{libbase_kernel}.h
%{_libdir}/pkgconfig/%{libbase_kernel}.pc
%{_libdir}/%{libbase_kernel}.so
%license %{lic_file}
%endif
%if %{with_docs}
%files doc
%defattr(-,root,root,-)
%{pkg_docdir}/
%{pkg_licdir}/
%endif
%changelog