Page MenuHomeDevCentral

D2397.diff
No OneTemporary

D2397.diff

diff --git a/map.jinja b/map.jinja
--- a/map.jinja
+++ b/map.jinja
@@ -197,6 +197,15 @@
},
}, default='Debian') %}
+{% set utilities = salt['grains.filter_by']({
+ 'FreeBSD': {
+ 'gmake': 'gmake',
+ },
+ 'Debian': {
+ 'gmake': 'make',
+ },
+}, default='Debian') %}
+
{# -------------------------------------------------------------
Capabilities of OS and distributions
diff --git a/roles/shellserver/odderon/code.sls b/roles/shellserver/odderon/code.sls
--- a/roles/shellserver/odderon/code.sls
+++ b/roles/shellserver/odderon/code.sls
@@ -6,6 +6,8 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
+{% from "map.jinja" import utilities with context %}
+
darkbot_repo:
file.directory:
- name: /opt/darkbot
@@ -21,10 +23,13 @@
darkbot_build:
cmd.script:
- - source: salt://roles/shellserver/odderon/files/build.sh
+ - source: salt://roles/shellserver/odderon/files/build.sh.jinja
- args: "--with-sleep=0 --with-add=0 --with-del=0 --with-random=0"
+ - template: jinja
+ - context:
+ gmake: {{ utilities.gmake }}
- cwd: /opt/darkbot
- runas: odderon
- - require:
+ - onchanges:
- git: darkbot_repo
- unless: test -f /opt/odderon/LOCKED
diff --git a/roles/shellserver/odderon/files/build.sh b/roles/shellserver/odderon/files/build.sh.jinja
rename from roles/shellserver/odderon/files/build.sh
rename to roles/shellserver/odderon/files/build.sh.jinja
--- a/roles/shellserver/odderon/files/build.sh
+++ b/roles/shellserver/odderon/files/build.sh.jinja
@@ -22,4 +22,4 @@
cd build || exit 2
sh configure -C --prefix=$PREFIX "$@"
-make
+{{ gmake }} clean all

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 10:40 (22 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2231659
Default Alt Text
D2397.diff (1 KB)

Event Timeline