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

template.spec 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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 bash-sfdoc
  50. Summary: Shellfu/Bash module to export docs from Shellfu modules
  51. Requires: perl
  52. Requires: shellfu-bash
  53. Requires: shellfu-bash-pretty
  54. %description bash-sfdoc
  55. This sub-package contains Shellfu/Bash module to export documentation
  56. from other Shellfu modules that follow Shellfu coding style.
  57. %package devel
  58. Summary: Essential developer tools
  59. Requires: shellfu-bash-pretty
  60. %description devel
  61. This sub-package contains tools useful mostly for development of shellfu
  62. scripts.
  63. %package sh
  64. Summary: Generic base
  65. Requires: shellfu
  66. %description sh
  67. This sub-package contains POSIX-oriented parts of library infrastructure.
  68. Generic Shellfu modules aiming for POSIX compatibility should depend on this.
  69. %package sh-charmenu
  70. Summary: Shellfu/sh module for building interactive terminal menus
  71. Requires: shellfu-sh
  72. Obsoletes: shellfu-bash-extras < 0.10
  73. %description sh-charmenu
  74. This sub-package contains 'charmenu', a Shellfu/sh module for building
  75. interactive terminal menus
  76. %package sh-exit
  77. Summary: Shellfu/sh module for standard exit statuses
  78. Requires: shellfu-sh
  79. Obsoletes: shellfu-bash-core < 0.10
  80. %description sh-exit
  81. This sub-package contains 'exit', Shellfu module containing few
  82. common ANSI color names.
  83. %package sh-mdfmt
  84. Summary: Markdown formatting helper
  85. Requires: shellfu-sh
  86. %description sh-mdfmt
  87. This sub-package contains Markdown formatting helper, a function that
  88. helps you generate Markdown paragraph elements from your shell scripts.
  89. %package sh-termcolors
  90. Summary: Shellfu/sh module for terminal color names
  91. Requires: shellfu-sh
  92. Obsoletes: shellfu-bash-core < 0.10
  93. %description sh-termcolors
  94. This sub-package contains 'termcolors', Shellfu module containing most
  95. common ANSI color names.
  96. %prep
  97. %setup -q
  98. %build
  99. make %{?_smp_mflags} PREFIX=/usr
  100. %install
  101. %make_install PREFIX=/usr
  102. %check
  103. make test \
  104. PATH=%{buildroot}/%{_bindir}:$PATH \
  105. SHELLFU_INCLUDE=%{buildroot}/%{_datadir}/%{name}/include \
  106. SHELLFU_DIR=%{buildroot}/%{_datadir}/%{name}
  107. %files
  108. %config %{_sysconfdir}/bash_completion.d/%{name}.bash
  109. %dir %{_datadir}/%{name}
  110. %dir %{_docdir}/%{name}
  111. %doc %{_docdir}/%{name}/LICENSE.md
  112. %doc %{_docdir}/%{name}/README.md
  113. %{_bindir}/sfdoc
  114. %{_bindir}/sfpath
  115. %{_datadir}/%{name}/shellfu.sh
  116. %files bash
  117. %dir %{_datadir}/%{name}/include-bash
  118. %files bash-inigrep
  119. %{_datadir}/%{name}/include-bash/inigrep.sh
  120. %files bash-pretty
  121. %{_datadir}/%{name}/include-bash/_pretty_color.sh
  122. %{_datadir}/%{name}/include-bash/_pretty_html.sh
  123. %{_datadir}/%{name}/include-bash/_pretty_journald.sh
  124. %{_datadir}/%{name}/include-bash/_pretty_notify.sh
  125. %{_datadir}/%{name}/include-bash/_pretty_plain.sh
  126. %{_datadir}/%{name}/include-bash/pretty.sh
  127. %files bash-sfdoc
  128. %{_datadir}/%{name}/include-bash/sfdoc.sh
  129. %files devel
  130. %{_bindir}/sfembed
  131. %files sh
  132. %dir %{_datadir}/%{name}/include-sh
  133. %files sh-charmenu
  134. %{_datadir}/%{name}/include-sh/charmenu.sh
  135. %files sh-exit
  136. %{_datadir}/%{name}/include-sh/exit.sh
  137. %files sh-mdfmt
  138. %{_datadir}/%{name}/include-sh/mdfmt.sh
  139. %files sh-termcolors
  140. %{_datadir}/%{name}/include-sh/termcolors.sh
  141. %changelog
  142. # specfile built with MKit __MKIT_SELF_VERSION__