Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
network:cryptocurrencies
bitcoingold
bitcoingold.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bitcoingold.spec of Package bitcoingold
# # spec file for package bitcoingold # # Copyright (c) 2020 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/ # Name: bitcoingold Version: 0.17.3 Release: 0 Summary: P2P digital currency License: MIT Group: Productivity/Networking/Other URL: http://btcgpu.org/ Source0: %{name}-%{version}.tar.xz Patch0: %{name}-boost.patch Patch1: %{name}-qt.patch Patch2: %{name}-queue.patch BuildRequires: automake %if 0%{?suse_version} && 0%{?suse_version} > 1320 BuildRequires: libboost_filesystem-devel BuildRequires: libboost_program_options-devel BuildRequires: libboost_system-devel BuildRequires: libboost_test-devel BuildRequires: libboost_thread-devel %else BuildRequires: boost-devel %endif BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: libb2-devel BuildRequires: libdb-4_8-devel BuildRequires: libevent-devel BuildRequires: libminiupnpc-devel BuildRequires: libsodium-devel >= 1.0.13 BuildRequires: libtool BuildRequires: qrencode-devel %if 0%{?suse_version} && 0%{?suse_version} >= 1315 BuildRequires: libopenssl-devel BuildRequires: libqt5-qtbase-devel BuildRequires: libqt5-qttools-devel %else BuildRequires: libqt4-devel %endif BuildRequires: libunivalue-devel BuildRequires: protobuf-devel BuildRequires: python3 %if 0%{?suse_version} && 0%{?is_opensuse} && 0%{?suse_version} == 1315 && 0%{?sle_version} && 0%{?sle_version} >= 120200 BuildRequires: shadow %endif BuildRequires: update-desktop-files BuildRequires: zeromq-devel %if ! %{defined _rundir} %define _rundir %{_localstatedir}/run %endif %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 progam base name %define progname bgold # set binary names %define display_name BitCoin Gold %define daemon_name %{progname}d %define cli_name %{progname}-cli %define tx_name %{progname}-tx %define bench_name bench_%{progname} %define gui_name %{progname}-qt %define test_name test_%{progname} %define test_gui_name test_%{gui_name} # set ports %define p2p_port 8338 %define rpc_port 18338 %define description_text BitCoin Gold is a fork of the BitCoin blockchain. %description %{description_text} %package utils Summary: Utils for the %{display_name} crypto-currency Group: Productivity/Networking/Other %description utils %{description_text} This package provides %{display_name} CLI and %{display_name} TX, a command line interface for %{display_name}. %package %{qt_version} Summary: GUI for the %{display_name} crypto-currency Group: Productivity/Networking/Other Obsoletes: %{name}-%{qt_version_obsolete} <= %{version} %description %{qt_version} %{description_text} This package provides %{display_name} Qt, a GUI for %{display_name} based on Qt. %package -n %{name}d Summary: Headless daemon for %{name} crypto-currency Group: Productivity/Networking/Other %description -n %{name}d %{description_text} This package provides %{daemon_name}, a headless %{name} daemon. %package test Summary: Automated tests for %{name} client Group: Productivity/Networking/Other Obsoletes: %{name}-bench <= %{version} %description test %{description_text} This package provides automated tests and benchmarks for %{gui_name} and %{daemon_name}. %package doc Summary: Documentation for %{name} Group: Documentation/Man BuildArch: noarch %description doc %{description_text} This package contains the documentation for %{name}. %prep %setup -q %if 0%{?suse_version} && 0%{?suse_version} > 1500 %patch0 %patch1 %patch2 %endif /usr/bin/dos2unix -k doc/README_windows.txt # setup systemd service %{__cp} -a contrib/init/bitcoind.service contrib/init/%{daemon_name}.service %{__sed} -i 's#^\# \$ systemctl edit bitcoind.service$#\# $ systemctl edit %{daemon_name}.service#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^\# /etc/bitcoingold/bitcoingold.conf#\# %{_sysconfdir}/%{progname}/%{progname}.conf#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^Description=Bitcoin Gold daemon$#Description=%{display_name} Daemon#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^PIDFile=/run/bgoldd/bgoldd.pid$#PIDFile=%{_rundir}/%{progname}/%{daemon_name}.pid#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^ExecStart=/usr/bin/bgoldd -daemon -conf=/etc/bitcoingold/bitcoingold.conf -pid=/run/bgoldd/bgoldd.pid$#ExecStart=%{_bindir}/%{daemon_name} -daemon -conf=%{_sysconfdir}/%{progname}/%{progname}.conf -pid=%{_rundir}/%{progname}/%{daemon_name}.pid -datadir=%{_localstatedir}/lib/%{progname} -disablewallet\nExecReload=/bin/kill -HUP \$MAINPID#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^\# Creates /run/bitcoind owned by bitcoin$#\# Creates %{_rundir}/%{progname} owned by %{progname}#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^RuntimeDirectory=bgoldd$#RuntimeDirectory=%{progname}#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^User=bitcoingold$#User=%{progname}#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^Group=bitcoingold$#Group=%{progname}#g' contrib/init/%{daemon_name}.service # setup default config file %{__cp} -a contrib/debian/examples/bitcoingold.conf contrib/debian/examples/%{progname}.conf %{__sed} -i 's#bgoldd#%{daemon_name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#bitcoingold#%{daemon_name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#BitcoinGold-Qt#%{gui_name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#BitcoinGold/#%{display_name}/#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#bitcoind#%{daemon_name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#Bitcoin-Qt#%{gui_name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#Bitcoin/#%{display_name}/#g' contrib/debian/examples/%{progname}.conf # setup firewall config %if 0%{?suse_version} && ( 0%{?suse_version} < 1500 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1500 && 0%{?sle_version} && 0%{?sle_version} <= 150200 ) ) echo "## Name: %{display_name} Daemon" > %{progname}.firewall echo "## Description: Opens ports for %{daemon_name} in order to allow remote connections." >> %{progname}.firewall echo -e "\nTCP=\"%{rpc_port}:%{p2p_port}\"" >> %{progname}.firewall %endif # setup run folder echo "d %{_rundir}/%{progname} 0770 root %{progname}" > rundir.conf %build ./autogen.sh %configure --docdir=%{_defaultdocdir}/%{name} --enable-silent-rules --enable-wallet --enable-upnp-default --enable-tests --enable-man --enable-bench --enable-hardening --enable-reduce-exports --with-miniupnpc --with-qrencode --with-boost --with-utils --without-libs --with-daemon --with-gui=%{qt_config} --with-qtdbus --with-system-univalue --disable-static CXXFLAGS="${CXXFLAGS} -DBUILD_SUFFIX=%{_host_vendor}" %if 0%{?suse_version} && 0%{?suse_version} >= 1500 %make_build %else %{__make} %{?_smp_mflags} %endif %{__strip} -s src/%{cli_name} %{__strip} -s src/bitcoin-tx %{__strip} -s src/bench/bench_bitcoin %{__strip} -s src/qt/bitcoin-qt %{__strip} -s src/%{daemon_name} %{__strip} -s src/qt/test/test_bitcoin-qt %{__strip} -s src/test/test_bitcoin %install %if 0%{?suse_version} && 0%{?suse_version} >= 1500 %make_install %else %{__make} %{?_smp_mflags} install DESTDIR=%{buildroot} %endif # move binaries to non-conflicting names %{__mv} %{buildroot}%{_bindir}/bitcoin-tx %{buildroot}%{_bindir}/%{tx_name} %{__mv} %{buildroot}%{_bindir}/bench_bitcoin %{buildroot}%{_bindir}/%{bench_name} %{__mv} %{buildroot}%{_bindir}/bitcoin-qt %{buildroot}%{_bindir}/%{gui_name} %{__mv} %{buildroot}%{_bindir}/test_bitcoin-qt %{buildroot}%{_bindir}/%{test_gui_name} %{__mv} %{buildroot}%{_bindir}/test_bitcoin %{buildroot}%{_bindir}/%{test_name} # move man pages to non-conflicting names %{__mv} %{buildroot}%{_mandir}/man1/bitcoin-tx.1 %{buildroot}%{_mandir}/man1/%{tx_name}.1 %{__mv} %{buildroot}%{_mandir}/man1/bitcoin-qt.1 %{buildroot}%{_mandir}/man1/%{gui_name}.1 # install daemon supplementary files %{__install} -D -m 0644 contrib/debian/examples/%{progname}.conf %{buildroot}%{_sysconfdir}/%{progname}/%{progname}.conf %{__install} -D -m 0644 contrib/init/%{daemon_name}.service %{buildroot}%{_unitdir}/%{daemon_name}.service %{__mkdir_p} %{buildroot}%{_localstatedir}/lib/%{progname} %{__install} -d -m 0755 %{buildroot}%{_sbindir} %{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{daemon_name} # install firewall config file %if 0%{?suse_version} && ( 0%{?suse_version} < 1500 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1500 && 0%{?sle_version} && 0%{?sle_version} <= 150200 ) ) %{__install} -D -m 644 %{progname}.firewall %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{daemon_name} %endif # install desktop file %{__install} -D -m 0644 share/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/%{progname}.png %suse_update_desktop_file -c %{gui_name} "%{display_name}" "%{display_name} Wallet" %{gui_name} %{progname} Office Finance # install run folder configuration %{__install} -D -m 0644 rundir.conf %{buildroot}/%{_tmpfilesdir}/%{progname}_rundir.conf # install documentation %{__install} -d -m 0755 %{buildroot}%{_defaultdocdir}/%{name} %{__install} -m 0644 -p -t %{buildroot}%{_defaultdocdir}/%{name} CONTRIBUTING.md README.md %{__install} -d -m 0755 %{buildroot}%{_defaultlicensedir}/%{name} %{__install} -m 0644 -p -t %{buildroot}%{_defaultlicensedir}/%{name} COPYING %{__cp} -a doc %{buildroot}%{_defaultdocdir}/%{name}/ %{__rm} -fr %{buildroot}%{_defaultdocdir}/%{name}/doc/man %fdupes %{buildroot}%{_defaultdocdir}/%{name} # no rpath check on arm architectures %ifarch %arm export NO_BRP_CHECK_RPATH=true %endif %check %{__make} %{?_smp_mflags} check %pre -n %{name}d getent group %{progname} > /dev/null || groupadd -r %{progname} getent passwd %{progname} > /dev/null || useradd -r -g %{progname} -d %{_localstatedir}/lib/%{progname} -s /sbin/nologin -c "%{progname} daemon" %{progname} %service_add_pre %{daemon_name}.service %preun -n %{name}d %service_del_preun %{daemon_name}.service %post -n %{name}d %service_add_post %{daemon_name}.service %if 0%{?suse_version} && ( 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1315 && 0%{?sle_version} && 0%{?sle_version} >= 120100 ) ) %tmpfiles_create %{_tmpfilesdir}/%{progname}_rundir.conf %else systemd-tmpfiles --create %{_tmpfilesdir}/%{progname}_rundir.conf >/dev/null 2>&1 || : %endif %if 0%{?suse_version} && 0%{?suse_version} < 1500 %post %{qt_version} %desktop_database_post %postun %{qt_version} %desktop_database_postun %endif %postun -n %{name}d %service_del_postun %{daemon_name}.service %files utils %defattr(-,root,root,-) %attr(755,root,root) %{_bindir}/%{cli_name} %attr(755,root,root) %{_bindir}/%{tx_name} %{_mandir}/man1/%{cli_name}.1%{?ext_man} %{_mandir}/man1/%{tx_name}.1%{?ext_man} %files %{qt_version} %defattr(-,root,root,-) %attr(755,root,root) %{_bindir}/%{gui_name} %{_datadir}/pixmaps/%{progname}.png %{_datadir}/applications/%{gui_name}.desktop %{_mandir}/man1/%{gui_name}.1%{?ext_man} %files -n %{name}d %defattr(-,root,root,-) %attr(755,root,root) %{_bindir}/%{daemon_name} %{_sbindir}/rc%{daemon_name} %{_unitdir}/%{daemon_name}.service %dir %attr(710,root,%{progname}) %{_sysconfdir}/%{progname} %config(noreplace) %{_sysconfdir}/%{progname}/%{progname}.conf %if 0%{?suse_version} && ( 0%{?suse_version} < 1500 || ( 0%{?is_opensuse} && 0%{?suse_version} == 1500 && 0%{?sle_version} && 0%{?sle_version} <= 150200 ) ) %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{daemon_name} %endif %dir %attr(700,%{progname},%{progname}) %{_localstatedir}/lib/%{progname} %ghost %{_rundir}/%{progname} %{_tmpfilesdir}/%{progname}_rundir.conf %{_mandir}/man1/%{daemon_name}.1%{?ext_man} %files test %defattr(-,root,root,-) %attr(755,root,root) %{_bindir}/%{bench_name} %attr(755,root,root) %{_bindir}/%{test_name} %attr(755,root,root) %{_bindir}/%{test_gui_name} %files doc %defattr(-,root,root,-) %{_defaultdocdir}/%{name}/ %{_defaultlicensedir}/%{name}/ %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor