Page MenuHomeDevCentral

D3627.id9380.diff
No OneTemporary

D3627.id9380.diff

diff --git a/roles/mailserver/dovecot/build.sls b/roles/mailserver/dovecot/build.sls
new file mode 100644
--- /dev/null
+++ b/roles/mailserver/dovecot/build.sls
@@ -0,0 +1,39 @@
+# -------------------------------------------------------------
+# Salt — Dovecot
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% if grains['os'] == 'FreeBSD' %}
+
+# -------------------------------------------------------------
+# Port options
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/db/ports/mail_dovecot/options:
+ file.managed:
+ - source: salt://roles/devserver/userland-software/files/port_options
+ - template: jinja
+ - mode: 644
+ - context:
+ args:
+ category: mail
+ name: mail_dovecot
+ options:
+ set:
+ - PGSQL
+
+# -------------------------------------------------------------
+# Build and install package
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+postgresql_build_port:
+ cmd.run:
+ - name: |
+ make build package deinstall reinstall
+ pkg lock --yes mail_dovecot
+ - cwd: /usr/ports/databases/mail_dovecot
+ - creates: /usr/local/etc/dovecot
+
+{% endif %}
diff --git a/roles/mailserver/dovecot/init.sls b/roles/mailserver/dovecot/init.sls
--- a/roles/mailserver/dovecot/init.sls
+++ b/roles/mailserver/dovecot/init.sls
@@ -5,6 +5,9 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
+include:
+ - .build
+
{% from "map.jinja" import dirs with context %}
{% set db = pillar["dovecot_config"]["db"] %}

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 30, 23:46 (8 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2619902
Default Alt Text
D3627.id9380.diff (1 KB)

Event Timeline