%define debug_package %{nil} Name: mavryk-accuser-PtBoreas Version: 20.2rc3 Release: 1 Epoch: 1 Summary: Daemon for accusing License: MIT BuildArch: x86_64 aarch64 Source0: mavryk-accuser-PtBoreas-20.2rc3.tar.gz Source1: https://gitlab.com/mavryk-network/mavryk-protocol/tree/v20.2-rc3/ BuildRequires: make wget systemd systemd-rpm-macros Requires: , udev %description Daemon for accusing Maintainer: Mavryk Dynamics Cowbot %prep %setup -q %build %install make mavkit-accuser-PtBoreas mkdir -p %{buildroot}/%{_bindir} install -m 0755 mavkit-accuser-PtBoreas %{buildroot}/%{_bindir} ln -s %{_bindir}/mavkit-accuser-PtBoreas %{buildroot}/%{_bindir}/mavryk-accuser-PtBoreas mkdir -p %{buildroot}/%{_unitdir} install -m 644 mavryk-accuser-ptboreas.service %{buildroot}/%{_unitdir} install -m 644 mavryk-accuser-ptboreas@.service %{buildroot}/%{_unitdir} mkdir -p %{buildroot}/%{_sysconfdir}/default install -m 644 mavryk-accuser-ptboreas.default %{buildroot}/%{_sysconfdir}/default/mavryk-accuser-ptboreas install -m 0755 mavryk-accuser-ptboreas-start %{buildroot}/%{_bindir} %files %license LICENSE %{_bindir}/mavkit-accuser-PtBoreas %{_bindir}/mavryk-accuser-PtBoreas %{_bindir}/mavryk-accuser-ptboreas-start %{_unitdir}/mavryk-accuser-ptboreas.service %{_unitdir}/mavryk-accuser-ptboreas@.service %{_sysconfdir}/default/mavryk-accuser-ptboreas %post %systemd_post mavryk-accuser-ptboreas.service %systemd_post mavryk-accuser-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-accuser-ptboreas.service %systemd_preun mavryk-accuser-ptboreas@.service %postun %systemd_postun_with_restart mavryk-accuser-ptboreas.service %systemd_postun_with_restart mavryk-accuser-ptboreas@.service