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.

63 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: gaia
  7. Summary: gaia - Tendermint Cosmos delegation game chain
  8. License: Apache 2.0
  9. URL: https://cosmos.network/
  10. Packager: Greg Szabo
  11. Requires: tendermint >= 0.10.0
  12. Requires(pre): /sbin/useradd
  13. %description
  14. Gaia description comes later.
  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} gaia init --home %{_sysconfdir}/%{name} 2B24DEE2364762300168DF19B6C18BCE2D399EA2
  28. #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124
  29. sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}/tendermint
  30. #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542
  31. #Temporary until https://github.com/tendermint/basecoin/issues/123
  32. rm -f %{_sysconfdir}/%{name}/key.json
  33. rm -f %{_sysconfdir}/%{name}/key2.json
  34. systemctl daemon-reload
  35. %preun
  36. systemctl stop %{name} 2> /dev/null || :
  37. systemctl stop %{name}-service 2> /dev/null || :
  38. %postun
  39. systemctl daemon-reload
  40. %files
  41. %ghost %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}
  42. %ghost %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}/tendermint
  43. %{_bindir}/*
  44. %{_sysconfdir}/systemd/system/*
  45. %{_sysconfdir}/systemd/system-preset/*
  46. %dir %{_datadir}/%{name}
  47. %{_datadir}/%{name}/*
  48. %dir %{_defaultlicensedir}/%{name}
  49. %doc %{_defaultlicensedir}/%{name}/LICENSE