Page MenuHomeDevCentral

D2134.diff
No OneTemporary

D2134.diff

diff --git a/pillar/devserver/ports.sls b/pillar/devserver/ports.sls
new file mode 100644
--- /dev/null
+++ b/pillar/devserver/ports.sls
@@ -0,0 +1,25 @@
+# -------------------------------------------------------------
+# Salt configuration for Nasqueron servers
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2020-01-18
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Ports to build manually
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ports:
+ xaos:
+ category: graphics
+ name: xaos
+ creates: /usr/local/bin/xaos
+ options:
+ set:
+ - NLS
+ - AALIB
+ unset:
+ - THREADS
+ - GTK2
+ - "X11"
diff --git a/pillar/top.sls b/pillar/top.sls
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -41,6 +41,7 @@
- webserver.wwwroot51
windriver:
+ - devserver.ports
- devserver.repos
- webserver.labs
- webserver.wwwroot51
diff --git a/roles/devserver/userland-software/files/port_options b/roles/devserver/userland-software/files/port_options
new file mode 100644
--- /dev/null
+++ b/roles/devserver/userland-software/files/port_options
@@ -0,0 +1,15 @@
+# -------------------------------------------------------------
+# Port options for {{ args['category'] }}/{{ args['name'] }}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/devserver/userland-software/files/port_options
+# -------------------------------------------------------------
+
+{% for option in args.get('options', {}).get('set') -%}
+OPTIONS_FILE_SET+={{ option }}
+{% endfor -%}
+
+{% for option in args.get('options', {}).get('unset') -%}
+OPTIONS_FILE_UNSET+={{ option }}
+{% endfor -%}
diff --git a/roles/devserver/userland-software/ports.sls b/roles/devserver/userland-software/ports.sls
new file mode 100644
--- /dev/null
+++ b/roles/devserver/userland-software/ports.sls
@@ -0,0 +1,36 @@
+# -------------------------------------------------------------
+# Salt — Provision dev software
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2020-01-18
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% if grains['os'] == 'FreeBSD' %}
+
+{% for port, args in pillar.get("ports", {}).items() %}
+
+# -------------------------------------------------------------
+# Provision port options
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/db/ports/{{ args['category'] }}_{{ args['name'] }}/options:
+ file.managed:
+ - source: salt://roles/devserver/userland-software/files/port_options
+ - template: jinja
+ - mode: 644
+ - context:
+ args: {{ args }}
+
+# -------------------------------------------------------------
+# Build and install package
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+port_{{ port }}:
+ cmd.run:
+ - name: make build package deinstall reinstall
+ - cwd: /usr/ports/{{ args['category'] }}/{{ args['name'] }}
+ - creates: {{ args['creates'] }}
+{% endfor %}
+
+{% endif %}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 23:32 (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2272055
Default Alt Text
D2134.diff (3 KB)

Event Timeline