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 7 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
     doc   = [ENV:PREFIX]/share/doc/shellfu-bash-saturnin
28
     doc   = [ENV:PREFIX]/share/doc/shellfu-bash-saturnin
29
     sfmod = [ENV:PREFIX]/share/shellfu/include-bash
29
     sfmod = [ENV:PREFIX]/share/shellfu/include-bash
30
 
30
 
31
+[tokens]
32
+    __SHELLFU_MODNAME__ = saturnin
33
+
31
 [files]
34
 [files]
32
     doc   = README.md
35
     doc   = README.md
33
     sfmod = src/saturnin.sh
36
     sfmod = src/saturnin.sh

+ 7
- 5
packaging/template.spec View File

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