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

template.spec 5.4KB

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