Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3715886
D2397.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D2397.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D2397: Compile darkbot only when code is updated
Attached
Detach File
Event Timeline
Log In to Comment