Working Saturnin-based meta-command

template.spec 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. %define sfincb %{_datadir}/shellfu/include-bash
  2. %define shellfu_req shellfu >= 0.10.4, shellfu < 0.11
  3. %define saturnin_req shellfu-bash-saturnin >= 0.4.10, shellfu-bash-saturnin < 0.5
  4. Name: __MKIT_PROJ_PKGNAME__
  5. Version: __MKIT_PROJ_VERSION__
  6. Release: 1%{?dist}
  7. Summary: __MKIT_PROJ_NAME__ - __MKIT_PROJ_TAGLINE__
  8. URL: __MKIT_PROJ_VCS_BROWSER__
  9. License: GPLv2
  10. Source0: %{name}-%{version}.tar.gz
  11. BuildArch: noarch
  12. BuildRequires: %saturnin_req
  13. BuildRequires: %shellfu_req
  14. Requires: %shellfu_req
  15. Requires: %saturnin_req
  16. Requires: shellfu-bash-saturnin_demo
  17. %description
  18. saturnin is Shellfu library that helps you easily build toolkit from
  19. various scripts that you may have lying around. Instead of having a
  20. herd of untamed undocumented and hard-to-share scripts, with help of
  21. saturnin you can easily create and package a meta-command with a set
  22. of discoverable and maintainable sub-commands.
  23. This package contains a demo meta-command built with saturnin; you can
  24. also re-use the source as template for your new toolkit.
  25. %package -n shellfu-bash-saturnin_demo
  26. Summary: Shellfu/Bash modules for saturnin-demo
  27. Requires: %saturnin_req
  28. Requires: shellfu-bash
  29. Requires: shellfu-bash-pretty
  30. %description -n shellfu-bash-saturnin_demo
  31. This sub-package contains Shellfu/Bash modules used by *saturnin-demo*.
  32. %prep
  33. %setup -q
  34. %build
  35. make %{?_smp_mflags} PREFIX=/usr
  36. %install
  37. %make_install PREFIX=/usr
  38. %check
  39. make test \
  40. PATH="%{buildroot}/%{_bindir}:$PATH" \
  41. SHELLFU_PATH="%{buildroot}/%{sfincb}"
  42. %files
  43. %config %{_sysconfdir}/bash_completion.d/%{name}.bash
  44. %dir %{_datadir}/%{name}
  45. %dir %{_datadir}/%{name}/ini.d
  46. %dir %{_datadir}/%{name}/ini.d/main
  47. %dir %{_libexecdir}/%{name}
  48. %doc %{_docdir}/%{name}/README.md
  49. %{_bindir}/%{name}
  50. %{_datadir}/%{name}/help
  51. %{_datadir}/%{name}/ini.d/main/echo.ini
  52. %{_libexecdir}/%{name}/%{name}-dump
  53. %{_libexecdir}/%{name}/%{name}-echo
  54. %{_libexecdir}/%{name}/%{name}-greet
  55. %files -n shellfu-bash-saturnin_demo
  56. %{sfincb}/saturnin_demo_greet.sh
  57. %changelog
  58. # specfile built with MKit __MKIT_SELF_VERSION__