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

template.spec 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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-exit
  87. Summary: Shellfu/sh module for standard exit statuses
  88. Requires: shellfu-sh
  89. Obsoletes: shellfu-bash-core < 0.10
  90. %description sh-exit
  91. This sub-package contains 'exit', Shellfu module containing functions
  92. and variables for standard exit statuses.
  93. %package sh-isa
  94. Summary: Shellfu/sh module with validation helpers
  95. Requires: shellfu-sh
  96. %description sh-isa
  97. This sub-package contains 'isa', Shellfu module containing few
  98. value validation helpers.
  99. %package sh-mdfmt
  100. Summary: Markdown formatting helper
  101. Requires: shellfu-sh
  102. %description sh-mdfmt
  103. This sub-package contains Markdown formatting helper, a function that
  104. helps you generate Markdown paragraph elements from your shell scripts.
  105. %package sh-termcolors
  106. Summary: Shellfu/sh module for terminal color names
  107. Requires: shellfu-sh
  108. Obsoletes: shellfu-bash-core < 0.10
  109. %description sh-termcolors
  110. This sub-package contains 'termcolors', Shellfu module containing most
  111. common ANSI color names.
  112. %prep
  113. %setup -q
  114. %build
  115. make %{?_smp_mflags} PREFIX=/usr
  116. %install
  117. %make_install PREFIX=/usr
  118. %check
  119. make test \
  120. PATH=%{buildroot}/%{_bindir}:$PATH \
  121. SHELLFU_INCLUDE=%{buildroot}/%{_datadir}/%{name}/include \
  122. SHELLFU_DIR=%{buildroot}/%{_datadir}/%{name}
  123. %files
  124. %config %{_sysconfdir}/bash_completion.d/%{name}.bash
  125. %dir %{_datadir}/%{name}
  126. %dir %{_docdir}/%{name}
  127. %doc %{_docdir}/%{name}/LICENSE.md
  128. %doc %{_docdir}/%{name}/README.md
  129. %{_bindir}/sfdoc
  130. %{_bindir}/sfpath
  131. %{_datadir}/%{name}/shellfu.sh
  132. %files bash
  133. %dir %{_datadir}/%{name}/include-bash
  134. %files bash-inigrep
  135. %{_datadir}/%{name}/include-bash/inigrep.sh
  136. %files bash-pretty
  137. %{_datadir}/%{name}/include-bash/_pretty_color.sh
  138. %{_datadir}/%{name}/include-bash/_pretty_html.sh
  139. %{_datadir}/%{name}/include-bash/_pretty_journald.sh
  140. %{_datadir}/%{name}/include-bash/_pretty_notify.sh
  141. %{_datadir}/%{name}/include-bash/_pretty_plain.sh
  142. %{_datadir}/%{name}/include-bash/pretty.sh
  143. %files bash-sfdoc
  144. %{_datadir}/%{name}/include-bash/sfdoc.sh
  145. %files bash-sfpi
  146. %{_datadir}/%{name}/include-bash/sfpi.sh
  147. %files devel
  148. %{_bindir}/sfembed
  149. %files sh
  150. %dir %{_datadir}/%{name}/include-sh
  151. %files sh-charmenu
  152. %{_datadir}/%{name}/include-sh/charmenu.sh
  153. %files sh-exit
  154. %{_datadir}/%{name}/include-sh/exit.sh
  155. %files sh-isa
  156. %{_datadir}/%{name}/include-sh/isa.sh
  157. %files sh-mdfmt
  158. %{_datadir}/%{name}/include-sh/mdfmt.sh
  159. %files sh-termcolors
  160. %{_datadir}/%{name}/include-sh/termcolors.sh
  161. %changelog
  162. # specfile built with MKit __MKIT_SELF_VERSION__