shell dot on steroids https://pagure.io/shellfu

template.spec 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. Name: __MKIT_PROJ_PKGNAME__
  2. Version: __MKIT_PROJ_VERSION__
  3. Release: 1%{?dist}
  4. Summary: __MKIT_PROJ_NAME__ - __MKIT_PROJ_TAGLINE__
  5. License: LGPLv2
  6. Source0: %{name}-%{version}.tar.gz
  7. BuildArch: noarch
  8. %if ( 0%{?rhel} && 0%{?rhel} < 7 ) || ( 0%{?centos} && 0%{?centos} < 7 )
  9. %define pspkg procps
  10. %else
  11. %define pspkg procps-ng
  12. %endif
  13. BuildRequires: perl
  14. BuildRequires: %{pspkg}
  15. Requires: %{pspkg}
  16. %description
  17. Shellfu is an attempt to add modularity to your shell scripts.
  18. With Shellfu you can develop your shell modules separately from your
  19. scripts, and test, use, explore or study them without need to be aware
  20. of details such as where the actual files are placed.
  21. Shellfu is mostly intended for cases when there's need for non-trivial
  22. amount of reliable body of shell scripts, and access to advanced modular
  23. languages such as Python or Perl is limited.
  24. This sub-package contains only the Shellfu management system but not
  25. actual modules. Use this if you want to write all modules yourself.
  26. %package bash
  27. Summary: Bash-specific base
  28. Requires: shellfu
  29. %description bash
  30. This sub-package contains Bash-specific parts of library infrastructure.
  31. Shellfu modules written for Bash should depend on this.
  32. %package bash-inigrep
  33. Summary: INI grepping Shellfu/Bash module
  34. Requires: perl
  35. Requires: shellfu-bash
  36. Requires: shellfu-bash-pretty
  37. Obsoletes: shellfu-bash-extras < 0.10
  38. %description bash-inigrep
  39. This sub-package contains 'inigrep', Shellfu/Bash module for reading
  40. INI-like files.
  41. %package bash-pretty
  42. Summary: Logging Shellfu/Bash module
  43. Requires: shellfu-bash
  44. Requires: shellfu-sh-exit
  45. Requires: shellfu-sh-termcolors
  46. Obsoletes: shellfu-bash-core < 0.10
  47. %description bash-pretty
  48. This sub-package contains 'pretty', universal Shellfu logging module.
  49. %package devel
  50. Summary: Essential developer tools
  51. Requires: shellfu-bash-pretty
  52. %description devel
  53. This sub-package contains tools useful mostly for development of shellfu
  54. scripts.
  55. %package sh
  56. Summary: Generic base
  57. Requires: shellfu
  58. %description sh
  59. This sub-package contains POSIX-oriented parts of library infrastructure.
  60. Generic Shellfu modules aiming for POSIX compatibility should depend on this.
  61. %package sh-charmenu
  62. Summary: Shellfu/sh module for building interactive terminal menus
  63. Requires: shellfu-sh
  64. Obsoletes: shellfu-bash-extras < 0.10
  65. %description sh-charmenu
  66. This sub-package contains 'charmenu', a Shellfu/sh module for building
  67. interactive terminal menus
  68. %package sh-exit
  69. Summary: Shellfu/sh module for standard exit statuses
  70. Requires: shellfu-sh
  71. Obsoletes: shellfu-bash-core < 0.10
  72. %description sh-exit
  73. This sub-package contains 'exit', Shellfu module containing few
  74. common ANSI color names.
  75. %package sh-mdfmt
  76. Summary: Markdown formatting helper
  77. Requires: shellfu-sh
  78. %description sh-mdfmt
  79. This sub-package contains Markdown formatting helper, a function that
  80. helps you generate Markdown paragraph elements from your shell scripts.
  81. %package sh-termcolors
  82. Summary: Shellfu/sh module for terminal color names
  83. Requires: shellfu-sh
  84. Obsoletes: shellfu-bash-core < 0.10
  85. %description sh-termcolors
  86. This sub-package contains 'termcolors', Shellfu module containing most
  87. common ANSI color names.
  88. %prep
  89. %setup -q
  90. %build
  91. make %{?_smp_mflags} PREFIX=/usr
  92. %install
  93. %make_install PREFIX=/usr
  94. %check
  95. make test \
  96. PATH=%{buildroot}/%{_bindir}:$PATH \
  97. SHELLFU_INCLUDE=%{buildroot}/%{_datadir}/%{name}/include \
  98. SHELLFU_DIR=%{buildroot}/%{_datadir}/%{name}
  99. %files
  100. %config %{_sysconfdir}/bash_completion.d/%{name}.bash
  101. %dir %{_datadir}/%{name}
  102. %dir %{_docdir}/%{name}
  103. %doc %{_docdir}/%{name}/LICENSE.md
  104. %doc %{_docdir}/%{name}/README.md
  105. %{_bindir}/sfdoc
  106. %{_bindir}/sfpath
  107. %{_datadir}/%{name}/shellfu.sh
  108. %files bash
  109. %dir %{_datadir}/%{name}/include-bash
  110. %files bash-inigrep
  111. %{_datadir}/%{name}/include-bash/inigrep.sh
  112. %files bash-pretty
  113. %{_datadir}/%{name}/include-bash/_pretty_color.sh
  114. %{_datadir}/%{name}/include-bash/_pretty_html.sh
  115. %{_datadir}/%{name}/include-bash/_pretty_journald.sh
  116. %{_datadir}/%{name}/include-bash/_pretty_notify.sh
  117. %{_datadir}/%{name}/include-bash/_pretty_plain.sh
  118. %{_datadir}/%{name}/include-bash/pretty.sh
  119. %files devel
  120. %{_bindir}/sfembed
  121. %files sh
  122. %dir %{_datadir}/%{name}/include-sh
  123. %files sh-charmenu
  124. %{_datadir}/%{name}/include-sh/charmenu.sh
  125. %files sh-exit
  126. %{_datadir}/%{name}/include-sh/exit.sh
  127. %files sh-mdfmt
  128. %{_datadir}/%{name}/include-sh/mdfmt.sh
  129. %files sh-termcolors
  130. %{_datadir}/%{name}/include-sh/termcolors.sh
  131. %changelog
  132. # specfile built with MKit __MKIT_SELF_VERSION__