Browse Source

Use more macros

To make it a bit easier to maintain multiple Shellfu/Bash libraries, we
want to have sort of "template" and keep every module as close to it as
practical.
Alois Mahdal 6 years ago
parent
commit
ffd85b0e23
2 changed files with 10 additions and 5 deletions
  1. 3
    0
      mkit.ini
  2. 7
    5
      packaging/template.spec

+ 3
- 0
mkit.ini View File

@@ -28,6 +28,9 @@
28 28
     doc   = [ENV:PREFIX]/share/doc/shellfu-bash-saturnin
29 29
     sfmod = [ENV:PREFIX]/share/shellfu/include-bash
30 30
 
31
+[tokens]
32
+    __SHELLFU_MODNAME__ = saturnin
33
+
31 34
 [files]
32 35
     doc   = README.md
33 36
     sfmod = src/saturnin.sh

+ 7
- 5
packaging/template.spec View File

@@ -5,16 +5,18 @@ Summary:    __MKIT_PROJ_NAME__ - __MKIT_PROJ_TAGLINE__
5 5
 URL:        __MKIT_PROJ_VCS_BROWSER__
6 6
 License:    LGPLv2
7 7
 
8
+%define sfincb %{_datadir}/shellfu/include-bash
9
+%define sfmodn __SHELLFU_MODNAME__
10
+%define shellfu_req shellfu >= 0.10.4, shellfu < 0.11
11
+
8 12
 Source0:        %{name}-%{version}.tar.gz
9 13
 BuildArch:      noarch
10
-BuildRequires:  shellfu => 0.10
11
-BuildRequires:  shellfu < 0.11
14
+BuildRequires:  %shellfu_req
12 15
 BuildRequires:  shellfu-bash-inigrep
13 16
 BuildRequires:  shellfu-bash-pretty
14 17
 BuildRequires:  shellfu-sh-exit
15 18
 
16
-Requires: shellfu => 0.10
17
-Requires: shellfu < 0.11
19
+Requires: %shellfu_req
18 20
 Requires: shellfu-bash
19 21
 Requires: shellfu-bash-inigrep
20 22
 Requires: shellfu-bash-pretty
@@ -41,7 +43,7 @@ make test \
41 43
 
42 44
 %files
43 45
 %doc %{_docdir}/%{name}/README.md
44
-%{_datadir}/shellfu/include-bash/saturnin.sh
46
+%{sfincb}/%{sfmodn}.sh
45 47
 
46 48
 
47 49
 %changelog