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.

57 lines
1.7 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): /sbin/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. fi
  19. %prep
  20. # Nothing to do here. - It is done in the Makefile.
  21. %build
  22. # Nothing to do here.
  23. %install
  24. cd %{name}-%{version}-%{release}
  25. %{__cp} -a * %{buildroot}
  26. %post
  27. sudo -Hu %{name} %{_bindir}/%{name} --datadir %{_sysconfdir}/%{name} init %{_sysconfdir}/%{name}/genesis.json
  28. sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}/tendermint
  29. systemctl daemon-reload
  30. %preun
  31. systemctl stop %{name} 2> /dev/null || :
  32. systemctl stop %{name}-service 2> /dev/null || :
  33. %postun
  34. systemctl daemon-reload
  35. %files
  36. %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}
  37. %config(noreplace) %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/genesis.json
  38. %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}/keystore
  39. %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/keystore/*
  40. %ghost %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}/tendermint
  41. %{_bindir}/*
  42. %{_sysconfdir}/systemd/system/*
  43. %{_sysconfdir}/systemd/system-preset/*
  44. %dir %{_defaultlicensedir}/%{name}
  45. %doc %{_defaultlicensedir}/%{name}/LICENSE