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

template.spec 5.8KB

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