* Move clang test environment to clang-6 for c++17 support * stop building clang 3.9.1 * centos updates GCC 7.4.1 cmake 3.15.4 boost build shared via prep.sh.in fix spec.in for nano_rpc * remove support for building CMAKE_CXX_STANDARD 14 * test instabilitydisable node_DeathTest.readonly_block_store_not_existinstability with clang and actions specfically
66 lines
2.3 KiB
RPMSpec
66 lines
2.3 KiB
RPMSpec
Name: nanocurrency
|
|
Version: @VERSION@
|
|
Release: @RELEASE@%{?dist}
|
|
Summary: Nanocurrency Daemon
|
|
License: BSD-2-Clause
|
|
URL: https://nano.org/
|
|
Requires(pre): /usr/sbin/useradd, /usr/bin/getent
|
|
Requires(postun): /usr/sbin/userdel
|
|
BuildRequires: make, libstdc++-static, glibc-devel, glibc-headers
|
|
Source: nano-%{version}.tar.gz
|
|
|
|
%description
|
|
This is nanocurrency daemon. Nano is a digital currency that is
|
|
peer-to-peer, decentralized, and trustless. This package includes
|
|
the nano daemon, and a service.
|
|
|
|
%prep
|
|
if [ ! -x "$(which cmake)" ]; then
|
|
echo "cmake must exist, try:" >&2
|
|
echo " scl enable devtoolset-7 'rpmbuild ...'" >&2
|
|
exit 1
|
|
fi
|
|
if cc --std=c++14 --version 2>&1 >/dev/null | grep '^' >/dev/null; then
|
|
echo "Unsupported C++ compiler, try:" >&2
|
|
echo " scl enable devtoolset-7 'rpmbuild ...'" >&2
|
|
exit 1
|
|
fi
|
|
if test ! -d /usr/local/boost; then
|
|
echo "Boost should be in /usr/local/boost" >&2
|
|
exit 1
|
|
fi
|
|
%autosetup -n nano-%{version}
|
|
|
|
%build
|
|
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBOOST_ROOT=/usr/local/boost .
|
|
make nano_node %{?_smp_mflags}
|
|
make nano_rpc %{?_smp_mflags}
|
|
|
|
%install
|
|
if [ ! %{buildroot} = "/" ]; then %{__rm} -rf %{buildroot}; fi
|
|
mkdir -p %{buildroot}/usr/bin
|
|
mkdir -p %{buildroot}/etc/systemd/system/
|
|
cp nano_node %{buildroot}/usr/bin/nano_node
|
|
cp nano_rpc %{buildroot}/usr/bin/nano_rpc
|
|
cp etc/systemd/nanocurrency.service %{buildroot}/etc/systemd/system/nanocurrency.service
|
|
|
|
%clean
|
|
if [ ! %{buildroot} = "/" ]; then %{__rm} -rf %{buildroot}; fi
|
|
|
|
%files
|
|
%defattr(755,root,root)
|
|
%{_bindir}/nano_node
|
|
%{_bindir}/nano_rpc
|
|
%attr(644,root,root) /etc/systemd/system/nanocurrency.service
|
|
|
|
%pre
|
|
PATH="/usr/bin:/usr/sbin:/bin:/sbin:${PATH}"; export PATH
|
|
mkdir -p /var/nanocurrency/Nano
|
|
getent group nanocurrency >/dev/null || groupadd --system nanocurrency || exit 1
|
|
getent passwd nanocurrency >/dev/null || useradd --system --create-home --home-dir /var/nanocurrency --shell /bin/bash --comment "Nanocurrency Daemon user" --gid nanocurrency nanocurrency || exit 1
|
|
chown -R nanocurrency:nanocurrency /var/nanocurrency
|
|
chmod 700 /var/nanocurrency
|
|
|
|
%postun
|
|
PATH="/usr/bin:/usr/sbin:/bin:/sbin:${PATH}"; export PATH
|
|
userdel nanocurrency >/dev/null 2>/dev/null || :
|