Ver código fonte

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 anos atrás
pai
commit
0452fbebe0
3 arquivos alterados com 13 adições e 8 exclusões
  1. 3
    0
      mkit.ini
  2. 1
    1
      packaging/debian/install
  3. 9
    7
      packaging/template.spec

+ 3
- 0
mkit.ini Ver arquivo

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

+ 1
- 1
packaging/debian/install Ver arquivo

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

+ 9
- 7
packaging/template.spec Ver arquivo

@@ -5,18 +5,20 @@ Summary:    __MKIT_PROJ_NAME__ - __MKIT_PROJ_TAGLINE__
5 5
 URL:        __MKIT_PROJ_VCS_BROWSER__
6 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 15
 BuildRequires: python
12 16
 BuildRequires: python-libs
13
-BuildRequires: shellfu => 0.10
14
-BuildRequires: shellfu < 0.11
15 17
 BuildRequires: shellfu-bash-pretty
18
+
19
+Requires: %shellfu_req
16 20
 Requires: python
17 21
 Requires: python-libs
18
-Requires: shellfu => 0.10
19
-Requires: shellfu < 0.11
20 22
 Requires: shellfu-bash
21 23
 Requires: shellfu-bash-pretty
22 24
 
@@ -42,7 +44,7 @@ make test \
42 44
 
43 45
 %files
44 46
 %doc %{_docdir}/%{name}/README.md
45
-%{_datadir}/shellfu/include-bash/uripecker.sh
47
+%{sfincb}/%{sfmodn}.sh
46 48
 
47 49
 
48 50
 %changelog