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

template.spec 4.8KB

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