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
0452fbebe0
3 changed files with 13 additions and 8 deletions
  1. 3
    0
      mkit.ini
  2. 1
    1
      packaging/debian/install
  3. 9
    7
      packaging/template.spec

+ 3
- 0
mkit.ini View File

27
     doc   = [ENV:PREFIX]/share/doc/shellfu-bash-uripecker
27
     doc   = [ENV:PREFIX]/share/doc/shellfu-bash-uripecker
28
     sfmod = [ENV:PREFIX]/share/shellfu/include-bash
28
     sfmod = [ENV:PREFIX]/share/shellfu/include-bash
29
 
29
 
30
+[tokens]
31
+    __SHELLFU_MODNAME__ = uripecker
32
+
30
 [files]
33
 [files]
31
     doc   = README.md
34
     doc   = README.md
32
     sfmod = src/uripecker.sh
35
     sfmod = src/uripecker.sh

+ 1
- 1
packaging/debian/install View File

1
-/usr/share/shellfu/include-bash/uripecker.sh
1
+/usr/share/shellfu/include-bash/__SHELLFU_MODNAME__.sh

+ 9
- 7
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
-Source0:    %{name}-%{version}.tar.gz
9
-BuildArch:  noarch
8
+%define sfincb %{_datadir}/shellfu/include-bash
9
+%define sfmodn __SHELLFU_MODNAME__
10
+%define shellfu_req shellfu >= 0.10.4, shellfu < 0.11
10
 
11
 
12
+Source0:       %{name}-%{version}.tar.gz
13
+BuildArch:     noarch
14
+BuildRequires: %shellfu_req
11
 BuildRequires: python
15
 BuildRequires: python
12
 BuildRequires: python-libs
16
 BuildRequires: python-libs
13
-BuildRequires: shellfu => 0.10
14
-BuildRequires: shellfu < 0.11
15
 BuildRequires: shellfu-bash-pretty
17
 BuildRequires: shellfu-bash-pretty
18
+
19
+Requires: %shellfu_req
16
 Requires: python
20
 Requires: python
17
 Requires: python-libs
21
 Requires: python-libs
18
-Requires: shellfu => 0.10
19
-Requires: shellfu < 0.11
20
 Requires: shellfu-bash
22
 Requires: shellfu-bash
21
 Requires: shellfu-bash-pretty
23
 Requires: shellfu-bash-pretty
22
 
24
 
42
 
44
 
43
 %files
45
 %files
44
 %doc %{_docdir}/%{name}/README.md
46
 %doc %{_docdir}/%{name}/README.md
45
-%{_datadir}/shellfu/include-bash/uripecker.sh
47
+%{sfincb}/%{sfmodn}.sh
46
 
48
 
47
 
49
 
48
 %changelog
50
 %changelog