Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768141
D1224.id3147.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D1224.id3147.diff
View Options
diff --git a/roles/viperserv/init.sls b/roles/viperserv/init.sls
--- a/roles/viperserv/init.sls
+++ b/roles/viperserv/init.sls
@@ -20,4 +20,5 @@
- .eggdrop
- .fbsql
- .fantoir
+ - .rabbitmq-tcl
- .wikidata-access-layer
diff --git a/roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch b/roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch
new file mode 100644
--- /dev/null
+++ b/roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch
@@ -0,0 +1,40 @@
+diff --git a/src/Makefile b/src/Makefile
+index f0f0a0b..932876b 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -37,13 +37,13 @@ TCLVERSION=8.6
+
+ # Headers to include
+
+-TCL_INCLUDE=/usr/include/tcl${TCLVERSION}
+-RABBITMQ_INCLUDE=/usr/include
++TCL_INCLUDE=/usr/local/include/tcl$(TCLVERSION)
++RABBITMQ_INCLUDE=/usr/local/include
+ INCLUDES=-I$(TCL_INCLUDE) -I$(RABBITMQ_INCLUDE)
+
+ # Libraries to use
+
+-LIBS=-ltcl${TCLVERSION} -lrabbitmq
++LIBS=-L/usr/local/lib -ltcl$(subst .,,${TCLVERSION}) -lrabbitmq
+
+ # Features
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 758220d..9df280a 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -30,12 +30,11 @@ TCLVERSION=8.6
+
+ # Headers to include
+
+-TCL_INCLUDE=/usr/include/tcl${TCLVERSION}
+-INCLUDES=-I$(TCL_INCLUDE)
++TCL_INCLUDE=/usr/local/include/tcl$(TCLVERSION)
++INCLUDES=-I/usr/local/include -I$(TCL_INCLUDE)
+
+ # Libraries to use
+-
+-LIBS=-lcmocka -ltcl -lrabbitmq
++LIBS=-L/usr/local/lib -lcmocka -ltcl${TCLVERSION:S/.//} -lrabbitmq
+
+ # Commands to use
diff --git a/roles/viperserv/rabbitmq-tcl/init.sls b/roles/viperserv/rabbitmq-tcl/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/viperserv/rabbitmq-tcl/init.sls
@@ -0,0 +1,59 @@
+# -------------------------------------------------------------
+# Salt — Deploy eggdrop park
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-11-17
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import packages with context %}
+
+# -------------------------------------------------------------
+# Build rabbitmq-tcl
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+rabbitmq-tcl_dependencies:
+ pkg.installed:
+ - pkgs:
+ - {{ packages.librabbitmq }}
+
+rabbitmq-tcl_repo:
+ file.directory:
+ - name: /opt/rabbitmq-tcl
+ - user: builder
+ - group: deployment
+ - dir_mode: 755
+ git.latest:
+ - name: https://devcentral.nasqueron.org/source/rabbitmq-tcl.git
+ - target: /opt/rabbitmq-tcl
+ - user: builder
+
+rabbitmq-tcl_build:
+ {% if grains['os'] == 'FreeBSD' %}
+ file.managed:
+ - name: /opt/rabbitmq-tcl/Makefile-FreeBSD.patch
+ - source: salt://roles/viperserv/rabbitmq-tcl/files/Makefile-FreeBSD.patch
+ - user: builder
+ - group: deployment
+ cmd.run:
+ - name: |
+ patch -p1 < Makefile-FreeBSD.patch
+ cd src/
+ gmake
+ {% else %}
+ cmd.run:
+ - name: cd src && make
+ {% endif %}
+ - runas: builder
+ - cwd: /opt/rabbitmq-tcl
+ - creates: /opt/rabbitmq-tcl/build/rabbitmq.so
+
+# -------------------------------------------------------------
+# Install rabbitmq-tcl
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/viperserv/lib/rabbitmq.so:
+ file.symlink:
+ - target: /opt/rabbitmq-tcl/build/rabbitmq.so
+ - user: viperserv
+ - group: nasqueron-irc
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 06:48 (19 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259443
Default Alt Text
D1224.id3147.diff (3 KB)
Attached To
Mode
D1224: Deploy rabbitmq-tcl
Attached
Detach File
Event Timeline
Log In to Comment