%define debug_package %{nil} Name: mavryk-baker-PtBoreas Version: 20.2rc3 Release: 1 Epoch: 1 Summary: Daemon for baking License: MIT BuildArch: x86_64 aarch64 Source0: mavryk-baker-PtBoreas-20.2rc3.tar.gz Source1: https://gitlab.com/mavryk-network/mavryk-protocol/tree/v20.2-rc3/ BuildRequires: make cmake m4 perl pkg-config wget unzip rsync gcc cargo opam git autoconf coreutils libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel protobuf-compiler protobuf-devel sqlite-devel systemd systemd-rpm-macros Requires: libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel protobuf-compiler protobuf-devel sqlite-devel, mavryk-sapling-params, mavryk-client, acl, udev %description Daemon for baking Maintainer: Mavryk Dynamics Cowbot %prep %setup -q %build %install make mavkit-baker-PtBoreas mkdir -p %{buildroot}/%{_bindir} install -m 0755 mavkit-baker-PtBoreas %{buildroot}/%{_bindir} ln -s %{_bindir}/mavkit-baker-PtBoreas %{buildroot}/%{_bindir}/mavryk-baker-PtBoreas mkdir -p %{buildroot}/%{_unitdir} install -m 644 mavryk-baker-ptboreas.service %{buildroot}/%{_unitdir} install -m 644 mavryk-baker-ptboreas@.service %{buildroot}/%{_unitdir} mkdir -p %{buildroot}/%{_sysconfdir}/default install -m 644 mavryk-baker-ptboreas.default %{buildroot}/%{_sysconfdir}/default/mavryk-baker-ptboreas install -m 0755 mavryk-baker-ptboreas-start %{buildroot}/%{_bindir} %files %license LICENSE %{_bindir}/mavkit-baker-PtBoreas %{_bindir}/mavryk-baker-PtBoreas %{_bindir}/mavryk-baker-ptboreas-start %{_unitdir}/mavryk-baker-ptboreas.service %{_unitdir}/mavryk-baker-ptboreas@.service %{_sysconfdir}/default/mavryk-baker-ptboreas %post %systemd_post mavryk-baker-ptboreas.service %systemd_post mavryk-baker-ptboreas@.service if [ -z $(getent passwd mavryk) ]; then useradd -r -s /bin/false -m -d /var/lib/mavryk mavryk chmod 0755 /var/lib/mavryk fi mkdir -p /var/lib/mavryk/.mavryk-client chown -R mavryk:mavryk /var/lib/mavryk/.mavryk-client %preun %systemd_preun mavryk-baker-ptboreas.service %systemd_preun mavryk-baker-ptboreas@.service %postun %systemd_postun_with_restart mavryk-baker-ptboreas.service %systemd_postun_with_restart mavryk-baker-ptboreas@.service