Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:marec2000:cryptocoins:ports
hodlcoin
hodlcoin.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File hodlcoin.spec of Package hodlcoin
# # spec file for package hodlcoin # # Copyright (c) 2021 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: hodlcoin Version: 6.0.0 Release: 0 Summary: P2P digital currency License: MIT Group: Productivity/Networking/Other URL: http://www.%{name}.com Source0: %{name}-%{version}.tar.xz Patch0: %{name}-boost1.patch Patch1: %{name}-boost2.patch Patch2: %{name}-build.patch Patch3: %{name}-configure.patch Patch4: %{name}-qt.patch Patch5: %{name}-util.patch ExclusiveArch: i586 x86_64 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_thread-devel %else BuildRequires: boost-devel %endif BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: libdb-4_8-devel BuildRequires: libminiupnpc-devel BuildRequires: libtool BuildRequires: qrencode-devel %if 0%{?suse_version} && 0%{?suse_version} >= 1315 %if 0%{?suse_version} && 0%{?suse_version} > 1320 BuildRequires: libopenssl-1_0_0-devel %else BuildRequires: libopenssl-devel %endif BuildRequires: libqt5-qtbase-devel BuildRequires: libqt5-qttools-devel %else BuildRequires: libqt4-devel %endif BuildRequires: protobuf-devel %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 %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 names %define progname %{name} %define display_name HOdlCoin # set binary names %define daemon_name %{progname}d %define cli_name %{progname}-cli %define tx_name %{progname}-tx %define gui_name %{progname}-qt # set ports %define p2p_port 1989 %define rpc_port 11989 # set package names %define daemon_packname %{name}d %define description_text HOdlcoin is just like BitCoin, but with one major difference. It pays interest on every balance. This is to recognize the importance of HODLers and properly reward them for HODLing. %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 %description %{qt_version} %{description_text} This package provides %{display_name}-Qt, a GUI for %{display_name} based on Qt. %package -n %{daemon_packname} Summary: Headless daemon for %{name} crypto-currency Group: Productivity/Networking/Other %{?systemd_requires} %description -n %{daemon_packname} %{description_text} This package provides %{daemon_name}, a headless %{name} daemon. %package doc Summary: Documentation for %{name} Group: Documentation/Man BuildArch: noarch %description doc %{description_text} %prep %setup -q %if 0%{?suse_version} && 0%{?suse_version} > 1320 %patch0 %ifarch i586 x86_64 %patch3 %endif %endif %if 0%{?suse_version} && 0%{?suse_version} > 1500 %patch1 %patch4 %endif %patch2 %patch5 /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#^Description=Bitcoin.s distributed currency daemon$#Description=%{display_name} Daemon#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^PIDFile=/var/lib/hodlcoind/hodlcoind.pid$#PIDFile=%{_rundir}/%{progname}/%{daemon_name}.pid#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^ExecStart=/usr/bin/hodlcoind -daemon -pid=/var/lib/hodlcoind/hodlcoind.pid \\$#ExecStart=%{_bindir}/%{daemon_name} -daemon -pid=%{_rundir}/%{progname}/%{daemon_name}.pid -conf=%{_sysconfdir}/%{progname}.conf -datadir=%{_localstatedir}/lib/%{progname} -disablewallet#g' contrib/init/%{daemon_name}.service %{__sed} -i 's#^-conf=/etc/hodlcoin/hodlcoin.conf -datadir=/var/lib/hodlcoind -disablewallet$#ExecReload=/bin/kill -HUP \$MAINPID#g' contrib/init/%{daemon_name}.service # setup default config file %{__cp} -a contrib/debian/examples/bitcoin.conf contrib/debian/examples/%{progname}.conf %{__sed} -i 's#Bitcoin-QT#%{gui_name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#Bitcoin#%{name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#bitcoin#%{name}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#8333#%{p2p_port}#g' contrib/debian/examples/%{progname}.conf %{__sed} -i 's#8332#%{rpc_port}#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 %if 0%{?suse_version} && 0%{?suse_version} > 1320 export CXXFLAGS="${CXXFLAGS} -DBOOST_ASIO_ENABLE_OLD_SERVICES" %endif %if 0%{?suse_version} && 0%{?suse_version} > 1500 export CXXFLAGS="${CXXFLAGS} -std=c++14" %endif ./autogen.sh %configure --docdir=%{_defaultdocdir}/%{name} --enable-silent-rules --enable-wallet --enable-upnp-default --disable-tests --enable-hardening --enable-reduce-exports --with-miniupnpc --with-qrencode --with-boost --with-utils --without-libs --with-daemon --with-gui=%{qt_config} --with-qtdbus --disable-static CXXFLAGS="${CXXFLAGS} -DBUILD_SUFFIX=%{_host_vendor}" %{__make} %{?_smp_mflags} %{__strip} -s src/%{cli_name} %{__strip} -s src/%{tx_name} %{__strip} -s src/qt/%{gui_name} %{__strip} -s src/%{daemon_name} %install %{__make} %{?_smp_mflags} install DESTDIR=%{buildroot} # install daemon supplementary files %{__install} -D -m 0644 contrib/debian/examples/%{progname}.conf %{buildroot}%{_sysconfdir}/%{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 src/qt/res/icons/bitcoin.png %{buildroot}%{_datadir}/pixmaps/%{name}.png %suse_update_desktop_file -c %{gui_name} %{display_name} "%{display_name} Wallet" %{gui_name} %{name} 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} README.md %{__install} -d -m 0755 %{buildroot}%{_defaultlicensedir}/%{name} %{__install} -m 0644 -p -t %{buildroot}%{_defaultlicensedir}/%{name} COPYING %{__cp} -a doc %{buildroot}%{_defaultdocdir}/%{name}/ %fdupes %{buildroot}%{_defaultdocdir}/%{name} %pre -n %{daemon_packname} 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 %{daemon_packname} %service_del_preun %{daemon_name}.service %post -n %{daemon_packname} %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 %{daemon_packname} %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} %files %{qt_version} %defattr(-,root,root,-) %attr(755,root,root) %{_bindir}/%{gui_name} %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/%{gui_name}.desktop %files -n %{daemon_packname} %defattr(-,root,root,-) %attr(755,root,root) %{_bindir}/%{daemon_name} %{_sbindir}/rc%{daemon_name} %{_unitdir}/%{daemon_name}.service %config(noreplace) %{_sysconfdir}/%{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 %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