You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.8 KiB

  1. Version: @VERSION@
  2. Release: @BUILD_NUMBER@
  3. %define __spec_install_post %{nil}
  4. %define debug_package %{nil}
  5. %define __os_install_post %{nil}
  6. Name: ethermint
  7. Summary: ethermint enables ethereum as an ABCI application on tendermint and the COSMOS hub
  8. License: Apache 2.0
  9. URL: https://tendermint.com/
  10. Packager: Greg Szabo
  11. Requires: tendermint >= 0.10.0
  12. #Requires(pre): useradd
  13. %description
  14. Ethermint enables ethereum to run as an ABCI application on tendermint and the COSMOS hub. This application allows you to get all the benefits of ethereum without having to run your own miners.
  15. %pre
  16. if ! %{__grep} -q '^%{name}:' /etc/passwd ; then
  17. useradd -k /dev/null -r -m -b %{_sysconfdir} %{name}
  18. chmod 755 %{_sysconfdir}/%{name}
  19. fi
  20. %prep
  21. # Nothing to do here. - It is done in the Makefile.
  22. %build
  23. # Nothing to do here.
  24. %install
  25. cd %{name}-%{version}-%{release}
  26. %{__cp} -a * %{buildroot}
  27. %post
  28. sudo -Hu %{name} %{_bindir}/%{name} --datadir %{_sysconfdir}/%{name} init %{_sysconfdir}/%{name}/genesis.json
  29. sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}/tendermint
  30. chmod 755 %{_sysconfdir}/%{name}/tendermint
  31. systemctl daemon-reload
  32. %preun
  33. systemctl stop %{name} 2> /dev/null || :
  34. systemctl stop %{name}-service 2> /dev/null || :
  35. %postun
  36. systemctl daemon-reload
  37. %files
  38. %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}
  39. %config(noreplace) %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/genesis.json
  40. %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}/keystore
  41. %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/keystore/*
  42. %ghost %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}/tendermint
  43. %{_bindir}/*
  44. %{_sysconfdir}/systemd/system/*
  45. %{_sysconfdir}/systemd/system-preset/*
  46. %dir %{_defaultlicensedir}/%{name}
  47. %doc %{_defaultlicensedir}/%{name}/LICENSE